I need to meet at least once the kind of people who need a difference between +0 and -0 in their code
@mathias #smashingconf
-
Show this thread
-
My question has just been replied to on stage by
@mathias
. In a few words, midnight is 0, midnight the day before is -0, next day is +0.1 reply 0 retweets 0 likesShow this thread
Replying to @odajay
Mathias Bynens Retweeted Mathias Bynens
The example is here: https://twitter.com/mathias/status/955520974010503168 … #SmashingConf
Mathias Bynens added,
Mathias BynensVerified account @mathias
In general, JavaScript code should not distinguish +0 and -0 IMHO. But here’s an exception!
Intl.RelativeTimeFormat plans to treat +0 and -0 differently:
+0 → future
-0 → past
This way, the positive/negative sign has the same meaning as for other numbers passed to this API. pic.twitter.com/LtcDiislAl
Show this thread
3:49 AM - 8 Feb 2018
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.