github / relative-time-element

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

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

Closed jyasskin closed 5 months ago

jyasskin commented 5 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 5 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.