!9 [sync] PR-7: Fix leading zero issue with date formatting

From: @openeuler-sync-bot 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
This commit is contained in:
openeuler-ci-bot 2024-11-19 05:45:17 +00:00 committed by Gitee
commit ec16efcbfa
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 43 additions and 4 deletions

View File

@ -0,0 +1,34 @@
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

View File

@ -1,10 +1,11 @@
Name: ovirt-engine-ui-extensions
Summary: oVirt UI Extensions
Version: 1.2.6
Release: 2
License: ASL 2.0
Release: 3
License: Apache-2.0
URL: http://www.ovirt.org/
Source: ovirt-engine-ui-extensions-1.2.6.tar.gz
Patch0: 0001-Update-leading-zero-use-case-for-date-formatting.patch
BuildArch: noarch
@ -31,6 +32,7 @@ Extensions include:
# Unpack the source:
%setup -q -n %{name}-%{version}
%patch 0 -p1
# Set up Node.js environment with dependencies linked to ./node_modules:
source %{_datadir}/ovirt-engine-nodejs-modules/setup-env.sh
@ -74,10 +76,13 @@ ln -s "%{_datadir}/%{name}/ansible-playbooks/ovirt-cluster-upgrade.yml" "%{build
%license LICENSE
%changelog
* Fri Mar 3 2023 yanjianqing<yanjianqing@kylinos.cn> -1.2.6-2
* Mon Nov 18 2024 jiangxinyu <jiangxinyu@kylinos.cn> - 1.2.6-3
- Fix leading zero issue with date formatting
* Fri Mar 3 2023 yanjianqing <yanjianqing@kylinos.cn> - 1.2.6-2
- Change hardcoded deafult hash algorithm from legacy md4 to sha512
* Tue Jul 6 2021 kymayl<mayilin@kylinos.cn> - 1.2.6-1
* Tue Jul 6 2021 kymayl <mayilin@kylinos.cn> - 1.2.6-1
- upgrade package
* Thu Mar 05 2020 huihui.fu <huihui.fu@cs2c.com.cn> - 1.0.10-1