Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Commit 636077c

Browse files
committed
Fix ICU tests to be compatible with reference on mozilla site
1 parent 3eaea67 commit 636077c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎tests/004-ICU-Intl_dateTimeFormat.phpt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,18 @@ console.log(new Intl.DateTimeFormat('en-US', options).format(date));
7979
// sometimes you want to be more precise
8080
var options = {
8181
hour: 'numeric', minute: 'numeric', second: 'numeric',
82+
timeZone: 'Australia/Sydney',
8283
timeZoneName: 'short'
8384
};
84-
console.log(new Intl.DateTimeFormat('en-AU', options).format(date).replace('AM', 'am'));
85+
console.log(new Intl.DateTimeFormat('en-AU', options).format(date).replace('PM', 'pm'));
8586
// → "2:00:00 pm AEDT"
8687
8788
// sometimes even the US needs 24-hour time
8889
options = {
8990
year: 'numeric', month: 'numeric', day: 'numeric',
9091
hour: 'numeric', minute: 'numeric', second: 'numeric',
91-
hour12: false
92+
hour12: false,
93+
timeZone: 'America/Los_Angeles'
9294
};
9395
console.log(date.toLocaleString('en-US', options));
9496
// → "12/19/2012, 19:00:00"
@@ -117,7 +119,6 @@ HEREDOC;
117119

118120
(new \V8\Script($context, new \V8\StringValue($isolate, $source)))->run($context);
119121

120-
121122
?>
122123
--EXPECT--
123124
12/20/2012
@@ -129,8 +130,8 @@ HEREDOC;
129130

130131
Donnerstag, 20. Dezember 2012
131132
Thursday, December 20, 2012, UTC
132-
3:00:00 am UTC
133-
12/20/2012, 03:00:00
133+
2:00:00 pm AEDT
134+
12/19/2012, 19:00:00
134135

135136
Wednesday, December 19, 2012
136137
jeudi 20 décembre 2012

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /