import { type ComPlainDate, type PlainDateFactory } from "./PlainDate.js"; import { type QuarterNumber, type WeekDayNumber } from "./constants.js"; /** * Describes an extended plain-date object with extra properties and * convenience methods for common operations, of which many are chainable. * * @see {@link ExPlainDate} factory for creating objects */ export interface ExtendedPlainDate extends ComPlainDate { /** * Get a native JS `Date` object in the system's local timezone. */ toLocalInstant: (time?: { hour?: number | string; minute?: number | string; second?: number | string; millisecond?: number | string; }) => Date; /** * Get a native JS `Date` object in a named timezone. * * @throws {RangeError} Invalid timezone specified */ toInstant: (timezone: string, time?: { hour?: number | string; minute?: number | string; second?: number | string; millisecond?: number | string; }) => Date; toLocaleStringMedium: (locale?: Intl.LocalesArgument) => string; toLocaleStringLong: (locale?: Intl.LocalesArgument) => string; toLocaleStringFull: (locale?: Intl.LocalesArgument) => string; dayName: (locale?: Intl.LocalesArgument) => string; dayNameShort: (locale?: Intl.LocalesArgument) => string; dayNameNarrow: (locale?: Intl.LocalesArgument) => string; monthName: (locale?: Intl.LocalesArgument) => string; monthNameShort: (locale?: Intl.LocalesArgument) => string; monthNameNarrow: (locale?: Intl.LocalesArgument) => string; /** Day of the year (1-366) */ ordinal: () => number; /** Quarter of the year (1-4) */ quarter: () => QuarterNumber; /** ISO weekday number (1-7) starting with Monday */ weekDayNumber: () => WeekDayNumber; /** Monday to Friday */ isBusinessDay: () => boolean; /** Saturday or Sunday */ isWeekendDay: () => boolean; isFirstDayOfMonth: () => boolean; isLastDayOfMonth: () => boolean; isFirstDayOfYear: () => boolean; isLastDayOfYear: () => boolean; isInLeapYear: () => boolean; daysInMonth: () => number; /** Common years have 365 days, leap years have 366 */ daysInYear: () => number; addDays: (days: number) => this; addBusinessDays: (days: number) => this; addMonths: (months: number) => this; addQuarters: (quarters: number) => this; addYears: (years: number) => this; /** Monday of the current week */ startOfBusinessWeek: () => this; /** Saturday of the current week */ startOfWeekend: () => this; startOfMonth: () => this; startOfQuarter: () => this; startOfYear: () => this; firstMonday: () => this; firstTuesday: () => this; firstWednesday: () => this; firstThursday: () => this; firstFriday: () => this; firstSaturday: () => this; firstSunday: () => this; differenceInDays: (to: ComPlainDate) => number; differenceInBusinessDays: (to: ComPlainDate) => number; differenceInMonths: (to: ComPlainDate) => number; differenceInYears: (to: ComPlainDate) => number; } /** * Factory function for making extended plain-date objects with extra properties * and convenience methods. * * @param date A date object with properties `year`, `month` & `day` * @returns A new immutable extended plain-date object */ export declare function ExPlainDate({ year, month, day }: { year: number | string; month?: number | string; day?: number | string; }): ExtendedPlainDate; export declare namespace ExPlainDate { var fromString: (this: PlainDateFactory, isoDateString: string) => T; var fromUtcInstant: (this: PlainDateFactory, instant?: Date) => T; var fromLocalInstant: (this: PlainDateFactory, instant?: Date) => T; var fromInstant: (this: PlainDateFactory, timezone: string, instant?: Date) => T; } //# sourceMappingURL=ExPlainDate.d.ts.map