import { LocalDateTime } from './LocalDateTime.js'; import { HourNumber, LocalTime, MinuteNumber } from './LocalTime.js'; import { DayOfWeek } from './DayOfWeek.js'; import { ZoneId, ZoneIdString } from './ZoneId'; import { ZonedDateTime } from './ZonedDateTime'; import { Instant } from './Instant'; export type MonthNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12; export type DayOfMonthNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31; declare const BRAND: unique symbol; export declare class LocalDate { readonly year: number; readonly month: MonthNumber; readonly dayOfMonth: DayOfMonthNumber; private [BRAND]; /** * @deprecated Use {@link of} instead */ constructor(year: number, month: MonthNumber | number, dayOfMonth: DayOfMonthNumber | number); static of(year: number, month: MonthNumber | number, dayOfMonth: DayOfMonthNumber | number): LocalDate; static from(date: Date): LocalDate; static parse(string: PreParseResult): PreParseResult; static parse(string: string, failSilently?: false): LocalDate; static parse(string: string | PreParseResult, failSilently?: false): LocalDate | PreParseResult; static parse(string: string, failSilently?: boolean): LocalDate | undefined; static parse(string: string | PreParseResult, failSilently?: boolean): LocalDate | PreParseResult | undefined; /** * Writes this {@link ZonedDateTime} as a string in specified format, and returns it. * @param formatString The format in which to write the date. The following substrings * (expressed in bold) will get translated to the the following values: *
    *
  • YY - year, short - 21
  • *
  • YYYY - year, full - 2021
  • *
  • M - month - 1..12 (January is 1)
  • *
  • Mo - month - 1st..12th (January is 1st)
  • *
  • MM - month - 01..12 (January is 01)
  • *
  • MMM - month, short - Jan
  • *
  • MMMM - month, full - January
  • *
  • Q - quarter - 1..4 (Jan-March is 1)
  • *
  • Qo - quarter - 1st..4th (Jan-March is 1st)
  • *
  • d - day of week - 0..6 (Monday is )
  • *
  • dd - day of week, 2 characters - Mo, Su
  • *
  • ddd - day of week, 3 characters - Mon, Sun
  • *
  • dddd - day of week, full - Monday, Wednesday
  • *
  • D - day of month - 1..31
  • *
  • Do - day of month - 1st..31st
  • *
  • DD - day of month - 01..31
  • *
  • DDD - day of year - 1..365 (1..366 for leap years)
  • *
  • DDDo - day of year - 1st..365th (1st..366th for leap years)
  • *
  • DDDD - day of year - 001..365 (001..366 for leap years)
  • *
  • w - week of year - 1..53
  • *
  • wo - week of year - 1st..53rd
  • *
  • ww - week of year - 01..53
  • *
  • And more. Formatting currently provided by moment.js, so for a complete list, see * the moment.js cheatsheet.
  • *
*/ format(formatString: string): string; /** * To ISO-8601 string, e.g. "2020-01-23" */ toString(): string; /** * Will return a positive integer if this {@link LocalDate} is after the {@link LocalDate} * given as argument, negative if before, and 0 if both {@link LocalDate}s are at exactly the same time * (millisecond precision); */ compareTo(other: LocalDate): number; equals(localDate: LocalDate | null | undefined): boolean; isBefore(other: LocalDate): boolean; isAfter(other: LocalDate): boolean; /** * The difference in days between this date and the other date. * E.g. when called with this date being 2021-02-29 and 'other' being * 2021-02-28, the resulting value is 1. */ diffInDays(other: LocalDate): number; at(hour: HourNumber | number, minute?: MinuteNumber | number): LocalDateTime; at(time: LocalTime): LocalDateTime; at(timeZone: ZoneId | ZoneIdString | string): ZonedDateTime; toInstant(timeZone: ZoneId | ZoneIdString | string): Instant; /** * @deprecated Use {@link at} instead */ atTime(localTime: LocalTime): LocalDateTime; plus(diff: { days: number; }): LocalDate; minus({ days }: { days: number; }): LocalDate; get dayOfWeek(): DayOfWeek; private get isoWeekDayNumber(); private toMoment; private get debugDescription(); static isInstance(value: any): value is LocalDate; } export {};