blob: 3c37afa1b4c75f20d9da62eb4963eed08e97a9ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// |reftest| skip -- Intl.DurationFormat is not supported
// Copyright (C) 2023 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-Intl.DurationFormat.prototype.format
description: >
Minutes with numeric or 2-digit style are included in the output when between displayed hours and seconds, even when the minutes value is zero.
locale: [en]
features: [Intl.DurationFormat]
---*/
const df = new Intl.DurationFormat("en", {
// hours must be numeric, so that a time separator is used for the following units.
hours: "numeric",
});
const duration = {
hours: 1,
minutes: 0,
seconds: 3,
};
const expected = "1:00:03"
assert.sameValue(
df.format(duration),
expected,
`Minutes always displayed when between displayed hours and seconds, even if minutes is 0`
);
reportCompare(0, 0);
|