Better relative date
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Component created
Component changed
Component body
This module provides a relative date formatter which is better than Date's time ago formatter. The main problem with the time ago formatter is that it allows to set the number of units, but not the minimum granularity.
For example of you choose to display two units you will get values like 'in 2 weeks and 2 days', but also 'in 1 minute and 12 seconds'.
For two events on the same day you will also get different values like 'in 3 hours' and 'in 5 hours', making it difficult to group appointsments by day.
This formatter allows one to choose the smallest granularity and never goes smaller than that. If you choose a granularity of 'days', the module will expose values like 'today', 'tomorrow', 'the day after tomorrow'. If the date is more than 2 days away it will fall back to week granularity showing values like 'this week' or 'next week' (it checks the 'First day of week' setting on admin/config/regional/settings).
It also comes with a special value to use for when the event is running. Instead of Date's "in 0 seconds", one can enter a value like 'now', 'active' or 'running'. This only applies for date fields that have an end date.
So this module is great for listing events, activities or appointments in Views, allowing you to simply group and list them for each day, week and more.
