UNPKG

@sms-frontend/components

Version:

SMS Design React UI Library.

21 lines (20 loc) 1.35 kB
import originDayjs, { Dayjs, OpUnitType, UnitType } from 'dayjs'; import 'dayjs/locale/zh-cn'; export declare const dayjs: typeof originDayjs; export declare const methods: { add(time: any, value: number, unit: UnitType): any; subtract(time: any, value: number, unit: UnitType): any; startOf(time: any, unit?: OpUnitType): any; endOf(time: any, unit?: OpUnitType): any; set(time: any, unit: UnitType, value: number): any; isSameWeek(date1: any, date2: any, weekStart: number, localeName: any): any; }; export declare function getNow(): originDayjs.Dayjs; export declare function initializeDateLocale(localeName: string, weekStart: number): void; export declare function getTimeFormat(format: any): string; export declare function getDayjsValue(time: any, format: string): originDayjs.Dayjs | originDayjs.Dayjs[]; export declare function getValueWithTime(date?: Dayjs, time?: Dayjs): Dayjs; export declare function getSortedDayjsArray(values?: Dayjs[]): originDayjs.Dayjs[]; export declare function isDayjsChange(prevValue: Dayjs | undefined, currentValue: Dayjs | undefined): boolean | originDayjs.Dayjs; export declare function isDayjsArrayChange(prevValue: Dayjs[] | undefined, currentValue: Dayjs[] | undefined): boolean | originDayjs.Dayjs[]; export declare function getResolvedDayjsLocaleName(localeName: string): string;