Overview
The Jekyll-TimeagoGem is a Ruby library that computes the distance between dates in words, with localization support. Originally built for Jekyll, it provides out-of-the-box support for Jekyll projects and can be used as a Liquid filter or tag. It also offers features such as future times, level of detail customization, approximate distance calculation, and command line utility.
Features
- Compute distance of dates: Calculate the distance between dates in words, such as “1 week and 2 days ago” or “5 months ago”.
- Future times: Support for calculating the distance of future times as well.
- Out of the box support for Jekyll: Can be easily integrated into Jekyll projects as a Liquid filter or tag.
- Localization: Provides localization support for different languages.
- Level of detail customization: Allows customization of the level of detail in the calculated distance.
- Command line utility: Can be used as a command line tool for date distance calculations.
- Approximate distance calculation: Provides the option to calculate approximate distances with a customizable threshold.
- Customizable translations: Allows users to provide their own translations or override the default translations.
Installation
To install the Jekyll-TimeagoGem, add the following line to your application’s Gemfile and execute the necessary command:
gem 'jekyll-timeago'
You can also install it manually by running:
gem install jekyll-timeago
Summary
The Jekyll-TimeagoGem is a Ruby library that allows developers to calculate the distance between dates in words. It provides various features such as localization support, customization of the level of detail in the calculated distance, and support for future times. It can be easily integrated into Jekyll projects and used as a Liquid filter or tag. Additionally, it offers a command line utility for date distance calculations and allows for customizable translations.