Skip to content

Instantly share code, notes, and snippets.

@cesarandreu
Created February 27, 2019 21:55
An example of a use-case for negative zero
// 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