pangea-lib 4.0.558 → 4.0.559
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/dist/main.cjs.js +1770 -1770
- package/dist/main.es.js +645 -636
- package/dist/types/helpers/datetime.helpers.d.ts +3 -1
- package/dist/types/types/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DatetimeFormat } from '../types';
|
|
1
|
+
import { DatetimeFormat, DateStr } from '../types';
|
|
2
2
|
|
|
3
3
|
type GetDatetimeStrConfig = {
|
|
4
4
|
format?: DatetimeFormat;
|
|
@@ -6,11 +6,13 @@ type GetDatetimeStrConfig = {
|
|
|
6
6
|
withoutDay?: boolean;
|
|
7
7
|
withTime?: boolean;
|
|
8
8
|
justTime?: boolean;
|
|
9
|
+
timeZone?: string;
|
|
9
10
|
};
|
|
10
11
|
export declare function getDatetimeStr(date: Date | null, config?: GetDatetimeStrConfig): string;
|
|
11
12
|
export declare function getMonthStr(datetime: Date): string;
|
|
12
13
|
export declare function getNumericDateStr(datetime: Date): string;
|
|
13
14
|
export declare function getTodayDateStr(): string;
|
|
15
|
+
export declare function formatDateStr(date: DateStr, config?: GetDatetimeStrConfig): string;
|
|
14
16
|
export declare function getDateStr(datetime: Date, { format }?: {
|
|
15
17
|
format: DatetimeFormat;
|
|
16
18
|
}): string;
|
|
@@ -26,6 +26,9 @@ export type NumOrFn = OrFn<number>;
|
|
|
26
26
|
export type BoolOrFn = OrFn<boolean>;
|
|
27
27
|
export type Align = 'center' | 'left' | 'right';
|
|
28
28
|
export type DatetimeFormat = 'numeric' | 'short' | 'long';
|
|
29
|
+
export type Datetime = Date;
|
|
30
|
+
export type DateStr = string;
|
|
31
|
+
export type TimeStr = string;
|
|
29
32
|
export type FileSource = 'static' | 'dynamic';
|
|
30
33
|
export type ExcelConfig = {
|
|
31
34
|
firstRow: number;
|