import dayjs from 'dayjs'; import { Duration } from '@wisemen/quantity'; import { PlainTime } from '../plain-time/plain-time.js'; import { Timezone, TimezoneInput } from '../common/timezone.js'; import { Timestamp } from '../timestamp/timestamp.js'; import { Month } from '../common/month.js'; import { PlainDateUnit, DiffPlainDateUnit, ReachablePlainDateUnit } from './plain-date.units.js'; import { PlainDateObject } from './plain-date-object.js'; import { PlainDate, PlainDateInput } from './plain-date.js'; import { IsoWeekParity } from './iso-week-parity.js'; import { IsoWeekday } from '#src/common/iso-weekday.js'; export declare class DayjsPlainDate implements PlainDate { private date; /** Defaults to today */ constructor(); /** * Parse a date from a string * @see https://day.js.org/docs/en/display/format */ constructor(dateString: string, format?: string); constructor(dayjs: dayjs.Dayjs); constructor(date: Date); constructor(date: PlainDate); constructor(plainTimeObject: PlainDateObject); constructor(date: number); constructor(date: number | string); constructor(date: string | number | Date); constructor(date: PlainDateInput); constructor(input?: PlainDateInput, format?: string); isSame(otherDate: PlainDateInput, unit?: PlainDateUnit): boolean; isAfter(otherDate: PlainDateInput, unit?: PlainDateUnit): boolean; isSameOrAfter(otherDate: PlainDateInput, unit?: PlainDateUnit): boolean; isBefore(otherDate: PlainDateInput, unit?: PlainDateUnit): boolean; isSameOrBefore(otherDate: PlainDateInput, unit?: PlainDateUnit): boolean; startOf(unit: ReachablePlainDateUnit): DayjsPlainDate; endOf(unit: ReachablePlainDateUnit): DayjsPlainDate; year(): number; month(): Month; dayOfMonth(): number; weekOfYear(): number; dayOfYear(): number; isToday(): boolean; isTomorrow(): boolean; isYesterday(): boolean; add(amount: number, unit: PlainDateUnit): DayjsPlainDate; /** * Returns a new `PlainDate` instance with the duration added. \ * Any duration less than a full day does not change the date, but still returns a new instance. \ * Similarly a duration of 1.4 days is applied as 1 day. */ addDuration(duration: Duration): PlainDate; subtract(amount: number, unit: PlainDateUnit): DayjsPlainDate; /** * Returns a new `PlainDate` instance with the duration subtracted. \ * Any duration less than a full day does not change the date, but still returns a new instance. \ * Similarly a duration of 1.4 days is applied as 1 day. */ subtractDuration(duration: Duration): PlainDate; until(otherDate: PlainDateInput): Duration; since(otherDate: PlainDateInput): Duration; diff(withOther: PlainDateInput, unit: DiffPlainDateUnit, precise?: boolean): number; compare(withOther: PlainDateInput): number; format(template: string): string; clone(): DayjsPlainDate; toPlainObject(): PlainDateObject; toDate(withTime?: PlainTime, timezone?: Timezone): Date; toString(): string; toJSON(): string; toTimestamp(withTime?: PlainTime, timezone?: TimezoneInput): Timestamp; unix(withTime?: PlainTime, timezone?: TimezoneInput): number; isFutureInfinity(): boolean; isPastInfinity(): boolean; day(): number; isMonday(): boolean; isTuesday(): boolean; isWednesday(): boolean; isThursday(): boolean; isFriday(): boolean; isSaturday(): boolean; isSunday(): boolean; isoWeekday(): IsoWeekday; isoWeekday(day: IsoWeekday): PlainDate; nextIsoWeekday(day: IsoWeekday): PlainDate; nextOrSameIsoWeekday(day: IsoWeekday): PlainDate; previousIsoWeekday(day: IsoWeekday): PlainDate; previousOrSameIsoWeekday(day: IsoWeekday): PlainDate; isoWeek(): number; isoWeekParity(): IsoWeekParity; isInfinity(): boolean; valueOf(): string; private combine; }