35 lines
1.4 KiB
Diff
35 lines
1.4 KiB
Diff
From c3099f1dbf0dd83bdca443dab55b310ea8efc040 Mon Sep 17 00:00:00 2001
|
|
From: jxy_git <jiangxinyu@kylinos.cn>
|
|
Date: Mon, 18 Nov 2024 17:21:12 +0800
|
|
Subject: [PATCH] Update leading zero use case for date formatting
|
|
|
|
---
|
|
src/utils/intl-test.js | 4 ++--
|
|
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/utils/intl-test.js b/src/utils/intl-test.js
|
|
index 40d422f..520a771 100644
|
|
--- a/src/utils/intl-test.js
|
|
+++ b/src/utils/intl-test.js
|
|
@@ -180,7 +180,7 @@ describe('DateTime Formatters', function () {
|
|
expect(currentTimeZone()).toBe('UTC')
|
|
|
|
expect(formatDate(new Date(Date.UTC(1999, 11, 31)))).toBe('31/12/1999')
|
|
- expect(formatDate(new Date(Date.UTC(2020, 6, 4)))).toBe('4/7/2020')
|
|
+ expect(formatDate(new Date(Date.UTC(2020, 6, 4)))).toBe('04/07/2020')
|
|
})
|
|
it('format datetime', function () {
|
|
initLocale('it-IT')
|
|
@@ -188,7 +188,7 @@ describe('DateTime Formatters', function () {
|
|
const utcTzName = extractUtcTimezoneName(currentLocale())
|
|
|
|
expect(formatDateTime(new Date(Date.UTC(1999, 11, 31, 16, 35, 42)))).toBe(`31/12/1999, 16:35:42 ${utcTzName}`)
|
|
- expect(formatDateTime(new Date(Date.UTC(2020, 6, 4, 11, 12, 13)))).toBe(`4/7/2020, 11:12:13 ${utcTzName}`)
|
|
+ expect(formatDateTime(new Date(Date.UTC(2020, 6, 4, 11, 12, 13)))).toBe(`04/07/2020, 11:12:13 ${utcTzName}`)
|
|
})
|
|
})
|
|
}
|
|
--
|
|
2.43.0
|
|
|