-
Notifications
You must be signed in to change notification settings - Fork 24
Incorrect "yesterday" examples #91
Comments
Oops, thanks. PRs welcome! |
FWIW, I documented |
Hi @littledan I'am preparing a PR based on Readme based on work done by @mathiasbynens , to have it aligned with code samples and documentation for MDN |
I'am not sure if its a behaviour or defect : rtf.format( -0,"day" ); // 0 days ago
rtf.format( 0,"day" ); // in 0 days |
It's a behavior, but your question shows all developers will also be confused about it. In practice, it's pointless to use numeric style for |
Is there anything missing to close this issue after #98 landed? |
The README contains several examples that result in
"yesterday"
, e.g.(search for "yesterday" to find them all)
However, it seems like in the default case,
"1 day ago"
is returned instead of"yesterday"
for this and other examples.To get the result of
"yesterday"
, thenumeric: 'auto'
setting is needed.This is verified by this particular Test262 test: https://github.com/tc39/test262/blob/a81cc4213b85461b6fbca1e50abd5cfb6b21ff54/implementation-contributed/v8/intl/relative-time-format/format-en.js#L120
There are two things to do here:
numeric
option in the README (currently, it's not mentioned at all)The text was updated successfully, but these errors were encountered: