use undefined instead of 0

This commit is contained in:
Frank Yung-Fong Tang 2020-07-09 18:00:40 -07:00 committed by Rick Waldron
parent 36e4278f20
commit 1161eee3e4
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ const d2 = new Date(2019, 7, 10, 1, 2, 3, 567);
const d3 = new Date(2019, 7, 10, 1, 2, 13, 987);
let dtf = new Intl.DateTimeFormat(
'en', { minute: "numeric", second: "numeric", fractionalSecondDigits: 0});
'en', { minute: "numeric", second: "numeric", fractionalSecondDigits: undefined});
assert.sameValue(dtf.formatRange(d1, d2), "02:03", "no fractionalSecondDigits");
assert.sameValue(dtf.formatRange(d1, d3), "02:03 02:13", "no fractionalSecondDigits");