@uxf/localize 11.13.0 → 11.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/locale/en.js
CHANGED
|
@@ -10,16 +10,16 @@ const locale = {
|
|
|
10
10
|
decimalSeparator: ".",
|
|
11
11
|
},
|
|
12
12
|
dateTime: {
|
|
13
|
-
timeShort: "
|
|
14
|
-
timeFull: "
|
|
13
|
+
timeShort: "h:mm A",
|
|
14
|
+
timeFull: "h:mm:ss A",
|
|
15
15
|
dateShort: "M/D/YY",
|
|
16
16
|
dateMedium: "M/D/YYYY",
|
|
17
17
|
dateLong: "MMMM D. YYYY",
|
|
18
18
|
dateShortNoYear: "M/D",
|
|
19
19
|
dateLongNoYear: "MMMM D.",
|
|
20
|
-
dateTimeShort: "M/D/YY
|
|
21
|
-
dateTimeMedium: "M/D/YYYY
|
|
22
|
-
dateTimeLong: "MMMM D. YYYY
|
|
20
|
+
dateTimeShort: "M/D/YY h:mm A",
|
|
21
|
+
dateTimeMedium: "M/D/YYYY h:mm A",
|
|
22
|
+
dateTimeLong: "MMMM D. YYYY h:mm:ss A",
|
|
23
23
|
},
|
|
24
24
|
};
|
|
25
25
|
exports.default = locale;
|
package/package.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FormatDatetimeFunction, LocalizeConfigMap } from "../types";
|
|
2
2
|
export declare function createFormatDatetime<DT extends string, Locales extends string>(localizeConfigs: LocalizeConfigMap<DT, Locales>): FormatDatetimeFunction<DT, Locales>;
|
|
3
|
-
export declare function createUseFormatDatetime<DT extends string, Locales extends string>(localizeConfigs: LocalizeConfigMap<DT, Locales>): () => (value: import("
|
|
3
|
+
export declare function createUseFormatDatetime<DT extends string, Locales extends string>(localizeConfigs: LocalizeConfigMap<DT, Locales>): () => (value: import("@uxf/core/date").DateValue, format: DT) => string;
|
package/src/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DateValue } from "@uxf/core/date";
|
|
1
2
|
import { FC, Provider } from "react";
|
|
2
3
|
import { CURRENCIES } from "./utils/data";
|
|
3
4
|
export type DateTimes = "timeShort" | "timeFull" | "dateShort" | "dateMedium" | "dateLong" | "dateShortNoYear" | "dateLongNoYear" | "dateTimeShort" | "dateTimeMedium" | "dateTimeLong";
|
|
@@ -39,9 +40,6 @@ export type FormatPercentageComponent = FC<{
|
|
|
39
40
|
roundingType?: RoundingType | null;
|
|
40
41
|
options?: FormatPercentageOptions;
|
|
41
42
|
}>;
|
|
42
|
-
export type DateString = `${number}-${number}-${number}`;
|
|
43
|
-
export type DateTimeString = `${number}-${number}-${number}T${number}:${number}:${number}+${number}:${number}`;
|
|
44
|
-
export type DateValue = Date | DateString | DateTimeString;
|
|
45
43
|
export type FormatDatetimeFunction<DT extends string, Locales extends string> = (locale: Locales, value: DateValue, format: DT) => string;
|
|
46
44
|
export type UseFormatDatetimeFunction<DT extends string> = () => (value: DateValue, format: DT) => string;
|
|
47
45
|
export type FormatDatetimeComponent<DT extends string> = FC<{
|