Skip to content

What is Timeago? ​

Timeago is a fast and lightweight library for working with dates and times. It transforms a given date into a human-readable "time ago" format, calculating the difference between the specified date and the current date. It supports both past and future dates, making it versatile for various use cases.

With its simple API and support for multiple languages, Timeago seamlessly adapts to different applications, whether you're building user interfaces, handling localized content, or working with changing or real-time dates.

Features ​

The library has several nice features, such as:

  • πŸ“… Flexible date parsing, supporting both past and future dates
  • βš™οΈ Configurable library with ability to pass options to suit various use cases, override translations or modify the output format
  • βœ… Comprehensive test coverage for reliability
  • 🌐 Timeago support multiple languages such as English, Russian, Ukrainian, Dutch, German, Chinese, Belarusian, Spanish and more. You can also easily contribute more following our step-by-step guide
  • πŸ“¦ Compact codebase for minimal footprint
  • πŸ•°οΈ Unix timestamp parsing
  • ⏱️ Support for date-time strings in the YYYY-MM-DD HH:MM:SS format
  • πŸ“† Compatibility with time.Time struct from the Go standard library
  • ✍️ Easy contribution of new language support
  • πŸ“ Detailed CHANGELOG.md for all updates and features
  • πŸ“– Thorough documentation for ease of use

Supported Languages ​

Timeago supports multiple languages, and you’re welcome to contribute additional ones. Check out the languages currently available:

#FlagLanguageISO 639-1 CodeConst
1πŸ‡¬πŸ‡§Englishentimeago.LangEn
2πŸ‡·πŸ‡ΊRussianrutimeago.LangRu
3πŸ‡ΊπŸ‡¦Ukrainianuktimeago.LangUk
4πŸ‡³πŸ‡±Dutchnltimeago.LangNl
5πŸ‡©πŸ‡ͺGermandetimeago.LangDe
6πŸ‡¨πŸ‡³Chinesezhtimeago.LangZh
7πŸ‡§πŸ‡ΎBelarusianbetimeago.LangBe
8πŸ‡ͺπŸ‡ΈSpanishestimeago.LangEs
9πŸ‡―πŸ‡΅Japanesejatimeago.LangJa
10πŸ‡«πŸ‡·Frenchfrtimeago.LangFr