You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2021. It is now read-only.
The unit test (tests/sanity.js) for issue #152 seems broken.
At least on my machine (probably because I am NOT in GMT-0500 (EST) time zone!) it produces an unexpected result:
Unit test:
// Issue #152assert(newIntlPolyfill.DateTimeFormat('en-US',{hour: 'numeric',minute: 'numeric'}).format(newDate('Tue Mar 01 2016 14:08:39 GMT-0500 (EST)')),'2:08 PM','missing leading 0 on minutes');assert(newIntlPolyfill.DateTimeFormat('en-GB',{hour: '2-digit',hour12: false,minute: 'numeric'}).format(newDate(1983,9,13)),'00:00','GB should use 2-digits for hours and minutes without hour12');
Result on my machine:
missing leading 0 on minutes
> ERROR: expected value 2:08 PM but the actual value is 8:08 PM
Since the Intl polyfill doesn't support the timeZone parameter in it's full glory, I assume it would make sense to change the test:
// Issue #152assert(newIntlPolyfill.DateTimeFormat('en-US',{hour: 'numeric',minute: 'numeric',timeZone: 'UTC'}).format(newDate('Tue Mar 01 2016 14:08:39 GMT+0 (UTC)')),'2:08 PM','missing leading 0 on minutes');assert(newIntlPolyfill.DateTimeFormat('en-GB',{hour: '2-digit',hour12: false,minute: 'numeric'}).format(newDate(1983,9,13)),'00:00','GB should use 2-digits for hours and minutes without hour12');
The text was updated successfully, but these errors were encountered:
The unit test (
tests/sanity.js
) for issue #152 seems broken.At least on my machine (probably because I am NOT in
GMT-0500 (EST)
time zone!) it produces an unexpected result:Unit test:
Result on my machine:
Since the Intl polyfill doesn't support the
timeZone
parameter in it's full glory, I assume it would make sense to change the test:The text was updated successfully, but these errors were encountered: