github / relative-time-element

Web component extensions to the standard <time> element.
https://github.github.io/relative-time-element/examples/
MIT License
3.57k stars 170 forks source link

Express "0 precision-units away" appropriately for the precision. #280

Closed jyasskin closed 7 months ago

jyasskin commented 7 months ago

This turns "now" into "today", "this month", "this hour", etc.

Fixes #279.

Whether "this minute" is better than "now" is debatable, but I feel like that debate should happen in the CLDR data that drives Intl.RelativeTimeFormat.format(0, 'minute') rather than in this library.

keithamus commented 7 months ago

Whether "this minute" is better than "now" is debatable, but I feel like that debate should happen in the CLDR data that drives Intl.RelativeTimeFormat.format(0, 'minute') rather than in this library.

Totally agree.