import { DateRange } from '../core/date-range'; /** * DateId: yyyymmdd * (Month: 01 ~ 12.) * tbd: support other formats like "yyyy/mm/dd" or "yyyy-mm-dd" as well? * ("yyyymmdd" format is good because it can be directly cast to number, e.g., for comparison, etc.) */ export declare namespace DateIdUtil { function isDateIdValid(dateId: string): boolean; function convertToDate(dateId: string): Date; function convertToId(date: Date): string; /** * Returns today's 'dateId' (yyyymmdd). */ function getTodayId(): string; function getTomorrowId(): string; function getYesterdayId(): string; function getNextDayId(dateId: string): string; function getNthDayId(dateId: string, dayN?: number): string; function convertToDateRange(dateId: string): DateRange; function getISODateString(dateId: (string | null), excludeTimePart?: boolean): string; function fromISODateString(str: string): string; function getLocaleDateString(dateId: (string | null)): string; function getDateString(dateId: (string | null), sep?: (string | null)): string; function convertToEpochMillis(dateId: string): number; function convertFromEpochMillis(millis: number): string; /** * Returns Sunday id of the given week. * * @param dateId Reference dateId. Today is used by default. */ function getSundayOfWeek(dateId?: string): string; /** * Returns the id of the first day of the given month. * * @param dateId Reference dateId. Today is used by default. */ function getFirstDayOfMonth(dateId?: string): string; /** * Returns the number of days until the same day next month. * * @param dateId Reference dateId. Today is used by default. */ function getNumberOfDaysForMonth(dateId?: string): number; /** * Returns the number of days from the same day in the previous month. * * @param dateId Reference dateId. Today is used by default. */ function getNumberOfDaysForPreviousMonth(dateId?: string): number; /** * Returns the number of days between the same day next month and the same day the following month. * * @param dateId Reference dateId. Today is used by default. */ function getNumberOfDaysForNextMonth(dateId?: string): number; }