Created
February 27, 2019 21:55
-
-
Save cesarandreu/7b3e9c5f816bdd8ab0fde94018f0592c to your computer and use it in GitHub Desktop.
An example of a use-case for negative zero
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// An example of a use-case for negative zero | |
const rtf = new Intl.RelativeTimeFormat('en') | |
rtf.format(0, 'hours') // 'in 0 hours' | |
rtf.format(-0, 'hours') // '0 hours ago' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment