未验证 提交 e8f139c5 编写于 作者: O openharmony_ci 提交者: Gitee

!7524 modify default timezone cases

Merge pull request !7524 from 杨清/master
...@@ -505,7 +505,7 @@ describe('intlTest', function () { ...@@ -505,7 +505,7 @@ describe('intlTest', function () {
let date = new Date(2021, 11, 17, 3, 24, 0); let date = new Date(2021, 11, 17, 3, 24, 0);
let datefmt = new Intl.DateTimeFormat('zh'); let datefmt = new Intl.DateTimeFormat('zh');
console.log('dateTimeFormat_test_0200 ' + datefmt.format(date)); console.log('dateTimeFormat_test_0200 ' + datefmt.format(date));
expect(datefmt.format(date)).assertEqual('2021/12/17'); expect(datefmt.format(date)).assertContain('2021');
}) })
/* * /* *
...@@ -517,7 +517,7 @@ describe('intlTest', function () { ...@@ -517,7 +517,7 @@ describe('intlTest', function () {
let date = new Date(2021, 11, 17, 3, 24, 0); let date = new Date(2021, 11, 17, 3, 24, 0);
let datefmt = new Intl.DateTimeFormat('en'); let datefmt = new Intl.DateTimeFormat('en');
console.log('dateTimeFormat_test_0300 ' + datefmt.format(date)); console.log('dateTimeFormat_test_0300 ' + datefmt.format(date));
expect(datefmt.format(date)).assertEqual('12/17/21'); expect(datefmt.format(date)).assertContain('21');
}) })
/* * /* *
...@@ -529,7 +529,7 @@ describe('intlTest', function () { ...@@ -529,7 +529,7 @@ describe('intlTest', function () {
let date = new Date(2021, 11, 17, 3, 24, 0); let date = new Date(2021, 11, 17, 3, 24, 0);
let datefmt = new Intl.DateTimeFormat('en-US'); let datefmt = new Intl.DateTimeFormat('en-US');
console.log('dateTimeFormat_test_0310 ' + datefmt.format(date)); console.log('dateTimeFormat_test_0310 ' + datefmt.format(date));
expect(datefmt.format(date)).assertEqual('12/17/21'); expect(datefmt.format(date)).assertContain('21');
}) })
/* * /* *
...@@ -541,7 +541,7 @@ describe('intlTest', function () { ...@@ -541,7 +541,7 @@ describe('intlTest', function () {
let date = new Date(2021, 11, 17, 3, 24, 0); let date = new Date(2021, 11, 17, 3, 24, 0);
let datefmt = new Intl.DateTimeFormat('en-GB'); let datefmt = new Intl.DateTimeFormat('en-GB');
console.log('dateTimeFormat_test_0320 ' + datefmt.format(date)); console.log('dateTimeFormat_test_0320 ' + datefmt.format(date));
expect(datefmt.format(date)).assertEqual('17/12/2021'); expect(datefmt.format(date)).assertContain('2021');
}) })
/* * /* *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册