UNPKG

@harvest-profit/npk

Version:
38 lines 2.77 kB
export declare const timeZones: () => string[]; export declare const today: () => Date; export declare const yesterday: () => Date; export declare const tomorrow: () => Date; export declare const nextMonth: () => Date; export declare const lastMonth: () => Date; export declare const nextYear: () => Date; export declare const lastYear: () => Date; export declare const startOfWeek: (date?: Date) => Date; export declare const endOfWeek: (date?: Date) => Date; export declare const startOfMonth: (date?: Date) => Date; export declare const endOfMonth: (date?: Date) => Date; export declare const startOfYear: (date?: Date) => Date; export declare const endOfYear: (date?: Date) => Date; export declare const startOfDay: (date?: Date) => Date; export declare const endOfDay: (date?: Date) => Date; export declare function change(date: Date, value: number | string, granularity: 'TOD' | 'minute' | 'hour' | 'day' | 'month' | 'monthIndex' | 'year'): Date; export declare function get(date: Date, granularity: 'minute' | 'hour' | '24Hour' | 'TOD' | 'day' | 'month' | 'monthIndex' | 'year', locale?: string, options?: {}): string; export declare function add(date: Date, amount: number, granularity: 'minute' | 'hour' | 'day' | 'month' | 'year'): Date; export declare function subtract(date: Date, amount: number, granularity: 'minute' | 'hour' | 'day' | 'month' | 'year'): Date; export declare function dayIsInFrontForCurrentLocale(): boolean; export declare function parse(dateValue: string | number | Date): Date; export declare function fromISO(dateString: string | Date): Date; export declare function toISODateTime(date: Date): string; export declare function toISODate(date: Date): string; export declare function fromTimestamp(number: number | string | Date): Date; export declare function toTimestamp(date: Date): number; export declare function getMonthNames(locale?: string, format?: 'long' | 'short'): any[]; export declare function getMonthNamesStartingWith(monthNamePart: string, locale?: string, format?: 'long' | 'short'): string[]; export declare function monthIndexToMonthNumber(monthIndex: any): any; export declare function monthNumberToMonthIndex(monthNumber: string | number): number; export declare function monthIndexToAbbrev(monthIndex: number): any; export declare function monthAbbrevToMonthIndex(monthAbbrev: string): number; export declare function isEqual(one: Date, two: Date, granularity?: 'day' | 'month' | 'year' | 'minute' | 'time'): any; export declare function getDatesInWeek(weekIndex: number, visibleDate: Date): Date[]; export declare function getWeeksInMonth(visibleDate: Date): number; export declare function nameForVisibleDates(visibleDate: Date, visibleMonths?: number, showYear?: boolean): any; //# sourceMappingURL=utils.d.ts.map