A Ruby library to compute date distances in human-readable words, with Jekyll integration and localization support.
Jekyll-Timeago is a Ruby library that computes the distance between dates and expresses it in human-readable words, such as "5 months ago" or "in 1 week". It solves the problem of displaying time differences in a natural, localized format for applications, especially static sites built with Jekyll. The library offers multiple output styles and extensive customization options for detail and language.
Ruby developers working on Jekyll-based static websites, blogs, or any project needing human-friendly date displays. It's also useful for developers building CLI tools or applications requiring localized time representations.
Developers choose Jekyll-Timeago for its seamless Jekyll integration, robust localization support, and flexibility in output formats. Its lightweight design and command-line interface make it a versatile choice over manual date calculations or less customizable alternatives.
⌛ Ruby library to compute distance of dates in words. Originally built for Jekyll.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works out-of-the-box as a Liquid filter or tag in Jekyll, allowing easy template usage without custom code, as detailed in the Jekyll integration section with configuration examples.
Includes built-in translations for languages like Spanish and Japanese, and supports custom locales via the mini_i18n gem, enabling internationalization with minimal setup.
Offers short, array, and hash styles for different use cases, such as abbreviated displays or structured data for APIs, demonstrated in the options section with code examples.
Allows control over detail with depth levels and thresholds, so developers can choose between approximate or exact time expressions, as shown in the usage examples.
Requires Ruby and Bundler, making it unsuitable for projects in other tech stacks or those aiming for lightweight, dependency-free solutions, as it cannot be used outside Ruby environments.
Focuses solely on date distance calculations, lacking features for other date operations like timezone conversion or complex formatting, which might necessitate additional libraries.
While usable in any Ruby project, the README emphasizes Jekyll setup, which could make integration into non-Jekyll applications less intuitive and require extra configuration effort.