mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-12-01 02:17:50 +01:00
Fix frontend locale tests after date-fns changed intl formatting
and also attempt to format dates in locale
This commit is contained in:
1 parent
9c25410331
commit
b01a22c393
8 files changed
+38
-21
No files matched your search
@@ -39,19 +39,19 @@ describe("DateFormatter", () => {
|
||||
it("format date from iso date", () => {
|
||||
const value = "2024-01-01T00:00:00.000Z";
|
||||
const text = formatDateTime(value);
|
||||
expect(text).toBe("Monday, 01/01/2024, 12:00:00 am");
|
||||
expect(text).toBe("1 Jan 2024, 12:00:00 am");
|
||||
});
|
||||
|
||||
it("format date from unix timestamp number", () => {
|
||||
const value = 1762476112;
|
||||
const text = formatDateTime(value);
|
||||
expect(text).toBe("Friday, 07/11/2025, 12:41:52 am");
|
||||
expect(text).toBe("7 Nov 2025, 12:41:52 am");
|
||||
});
|
||||
|
||||
it("format date from unix timestamp string", () => {
|
||||
const value = "1762476112";
|
||||
const text = formatDateTime(value);
|
||||
expect(text).toBe("Friday, 07/11/2025, 12:41:52 am");
|
||||
expect(text).toBe("7 Nov 2025, 12:41:52 am");
|
||||
});
|
||||
|
||||
it("catch bad format from string", () => {
|
||||
|
||||
Reference in new issue
Block a user