mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 07:16:39 +00:00
Bump fecha (#5728)
This commit is contained in:
parent
e5abb95f5c
commit
636429ccfa
@ -84,7 +84,7 @@
|
|||||||
"deep-clone-simple": "^1.1.1",
|
"deep-clone-simple": "^1.1.1",
|
||||||
"deep-freeze": "^0.0.1",
|
"deep-freeze": "^0.0.1",
|
||||||
"es6-object-assign": "^1.1.0",
|
"es6-object-assign": "^1.1.0",
|
||||||
"fecha": "^3.0.2",
|
"fecha": "^4.2.0",
|
||||||
"fuse.js": "^3.4.4",
|
"fuse.js": "^3.4.4",
|
||||||
"google-timezones-json": "^1.0.2",
|
"google-timezones-json": "^1.0.2",
|
||||||
"hls.js": "^0.12.4",
|
"hls.js": "^0.12.4",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import fecha from "fecha";
|
import { format } from "fecha";
|
||||||
import { toLocaleDateStringSupportsOptions } from "./check_options_support";
|
import { toLocaleDateStringSupportsOptions } from "./check_options_support";
|
||||||
|
|
||||||
export const formatDate = toLocaleDateStringSupportsOptions
|
export const formatDate = toLocaleDateStringSupportsOptions
|
||||||
@ -8,4 +8,4 @@ export const formatDate = toLocaleDateStringSupportsOptions
|
|||||||
month: "long",
|
month: "long",
|
||||||
day: "numeric",
|
day: "numeric",
|
||||||
})
|
})
|
||||||
: (dateObj: Date) => fecha.format(dateObj, "longDate");
|
: (dateObj: Date) => format(dateObj, "longDate");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import fecha from "fecha";
|
import { format } from "fecha";
|
||||||
import { toLocaleStringSupportsOptions } from "./check_options_support";
|
import { toLocaleStringSupportsOptions } from "./check_options_support";
|
||||||
|
|
||||||
export const formatDateTime = toLocaleStringSupportsOptions
|
export const formatDateTime = toLocaleStringSupportsOptions
|
||||||
@ -10,11 +10,7 @@ export const formatDateTime = toLocaleStringSupportsOptions
|
|||||||
hour: "numeric",
|
hour: "numeric",
|
||||||
minute: "2-digit",
|
minute: "2-digit",
|
||||||
})
|
})
|
||||||
: (dateObj: Date) =>
|
: (dateObj: Date) => format(dateObj, "MMMM D, YYYY, HH:mm");
|
||||||
fecha.format(
|
|
||||||
dateObj,
|
|
||||||
`${fecha.masks.longDate}, ${fecha.masks.shortTime}`
|
|
||||||
);
|
|
||||||
|
|
||||||
export const formatDateTimeWithSeconds = toLocaleStringSupportsOptions
|
export const formatDateTimeWithSeconds = toLocaleStringSupportsOptions
|
||||||
? (dateObj: Date, locales: string) =>
|
? (dateObj: Date, locales: string) =>
|
||||||
@ -26,8 +22,4 @@ export const formatDateTimeWithSeconds = toLocaleStringSupportsOptions
|
|||||||
minute: "2-digit",
|
minute: "2-digit",
|
||||||
second: "2-digit",
|
second: "2-digit",
|
||||||
})
|
})
|
||||||
: (dateObj: Date) =>
|
: (dateObj: Date) => format(dateObj, "MMMM D, YYYY, HH:mm:ss");
|
||||||
fecha.format(
|
|
||||||
dateObj,
|
|
||||||
`${fecha.masks.longDate}, ${fecha.masks.mediumTime}`
|
|
||||||
);
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import fecha from "fecha";
|
import { format } from "fecha";
|
||||||
import { toLocaleTimeStringSupportsOptions } from "./check_options_support";
|
import { toLocaleTimeStringSupportsOptions } from "./check_options_support";
|
||||||
|
|
||||||
export const formatTime = toLocaleTimeStringSupportsOptions
|
export const formatTime = toLocaleTimeStringSupportsOptions
|
||||||
@ -7,7 +7,7 @@ export const formatTime = toLocaleTimeStringSupportsOptions
|
|||||||
hour: "numeric",
|
hour: "numeric",
|
||||||
minute: "2-digit",
|
minute: "2-digit",
|
||||||
})
|
})
|
||||||
: (dateObj: Date) => fecha.format(dateObj, "shortTime");
|
: (dateObj: Date) => format(dateObj, "shortTime");
|
||||||
|
|
||||||
export const formatTimeWithSeconds = toLocaleTimeStringSupportsOptions
|
export const formatTimeWithSeconds = toLocaleTimeStringSupportsOptions
|
||||||
? (dateObj: Date, locales: string) =>
|
? (dateObj: Date, locales: string) =>
|
||||||
@ -16,4 +16,4 @@ export const formatTimeWithSeconds = toLocaleTimeStringSupportsOptions
|
|||||||
minute: "2-digit",
|
minute: "2-digit",
|
||||||
second: "2-digit",
|
second: "2-digit",
|
||||||
})
|
})
|
||||||
: (dateObj: Date) => fecha.format(dateObj, "mediumTime");
|
: (dateObj: Date) => format(dateObj, "mediumTime");
|
||||||
|
@ -7139,10 +7139,10 @@ fecha@^2.3.3:
|
|||||||
resolved "https://registry.yarnpkg.com/fecha/-/fecha-2.3.3.tgz#948e74157df1a32fd1b12c3a3c3cdcb6ec9d96cd"
|
resolved "https://registry.yarnpkg.com/fecha/-/fecha-2.3.3.tgz#948e74157df1a32fd1b12c3a3c3cdcb6ec9d96cd"
|
||||||
integrity sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==
|
integrity sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==
|
||||||
|
|
||||||
fecha@^3.0.2:
|
fecha@^4.2.0:
|
||||||
version "3.0.2"
|
version "4.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/fecha/-/fecha-3.0.2.tgz#fb3adb02762ab6dd27f7d5419f2f6c21a4229cd7"
|
resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.0.tgz#3ffb6395453e3f3efff850404f0a59b6747f5f41"
|
||||||
integrity sha512-oJK6YbKtmz1uvuDsUHOmo9X2HKmYAcRWtzW2yrCzOJRUfyGUEu/8cDymBdedgEnkdJiTpNyPogWqfTuYffU4yA==
|
integrity sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg==
|
||||||
|
|
||||||
figgy-pudding@^3.5.1:
|
figgy-pudding@^3.5.1:
|
||||||
version "3.5.1"
|
version "3.5.1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user