use undefined instead of 0 so range is only 1-3

This commit is contained in:
Frank Yung-Fong Tang 2020-07-09 17:59:31 -07:00 committed by Rick Waldron
parent 21824359d0
commit 36e4278f20
1 changed files with 1 additions and 1 deletions

View File

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