/** * * Date Helper class. * Used in datatable and datepicker modules * @author ph03n1x404 bugged it */ export declare const ISO8601_DATE_REGEX: RegExp; export declare const NAMED_FORMATS: { [localeId: string]: { [format: string]: string; }; }; export declare const DATE_FORMATS_SPLIT: RegExp; export declare const dayInMs = 86400000; export declare enum SnDateFormatTypes { GERMAN_STYLE = "dd.MM.yyyy", ITALIAN_STYLE = "dd-MM-yyyy", ENGLISH_STYLE = "dd/MM/yyyy", READ_STYLE = "MMM dd yyyy" } /** * Converts a value to datetime-components-example. * * Supported input formats: * - `Date` * - number: timestamp * - string: numeric (e.g. "1234"), ISO and datetime-components-example strings in a format supported by * [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). * Note: ISO strings without time return a datetime-components-example without timeoffset. * * Throws if unable to convert to a datetime-components-example. */ export declare function convertToDate(value: string | number | Date): Date; /** * Converts a datetime-components-example in ISO8601 to a Date. * Used instead of `Date.parse` because of browser discrepancies. */ export declare function isoStringToDate(match: RegExpMatchArray): Date; export declare function isValidDate(value: any): value is Date; export declare function getMonday(d: Date): Date; export declare function getSunday(d: Date): Date; export declare function getWeekDaysByDate(d?: Date | null): { [key: string]: Date; from: Date; to: Date; }; export declare function getDaysInMonthByDate(d: Date): number; export declare function getDateDiff(startDate: Date, endDate: Date, diffType?: 'd' | 'w' | 'm' | 'y'): number; export declare function isLeapYear(year: number): boolean; export declare function getMonthDaysByYear(year: number): {}; export declare function getWeekOfYear(d: Date): number; export declare function getWeekOfMonth(d: Date): number; export declare function getYearDayIndex(d: Date): number; export declare function getRandomDate(start: Date, end: Date): Date; export declare function getStartEndMonthRange(date?: Date): { startMonth: Date; endMonth: Date; }; export declare function addDate(d: Date, move: number): Date; export declare function forwardDateRange(sd: Date, ed: Date): { startDate: Date; endDate: Date; range: number; }; export declare function backwardDateRange(sd: Date, ed: Date): { startDate: Date; endDate: Date; range: number; }; export declare function isToday(sd: Date): boolean; export declare function isDateInCurrentWeek(sd: Date): boolean; export declare function isDateInCurrentMonth(sd: Date): boolean; export declare function getNextDate(d: Date): Date; export declare function getPreviousDate(d: Date): Date; export declare function getNextWeek(d: Date, range?: number): { [key: string]: Date; from: Date; to: Date; }; export declare function getPreviousWeek(d: Date, range?: number): { [key: string]: Date; from: Date; to: Date; }; export declare function getNextMonth(d: Date): { startMonth: Date; endMonth: Date; }; export declare function getPreviousMonth(d: Date): { startMonth: Date; endMonth: Date; }; export declare function getDatesInRange(startDate: Date, endDate: Date): Date[]; export declare function sortDates(dates: Date[]): Date[]; export declare function isDateInRange(date: Date, startDate: Date, endDate: Date, considerTime?: boolean): boolean;