UNPKG

ng-pick-datetime-ex

Version:
69 lines 3.15 kB
/** * dayjs-date-time-adapter.class */ import { InjectionToken } from '@angular/core'; import { Dayjs } from 'dayjs'; import { DateTimeAdapter } from '../date-time-adapter.class'; import * as i0 from "@angular/core"; /** Configurable options for {@see DayjsDateAdapter}. */ export interface OwlDayjsDateTimeAdapterOptions { /** * Turns the use of utc dates on or off. * Changing this will change how the DateTimePicker output value. * {@default false} */ useUtc: boolean; } /** InjectionToken for dayjs date adapter to configure options. */ export declare const OWL_DAYJS_DATE_TIME_ADAPTER_OPTIONS: InjectionToken<OwlDayjsDateTimeAdapterOptions>; /** @docs-private */ export declare function OWL_MOMENT_DATE_TIME_ADAPTER_OPTIONS_FACTORY(): OwlDayjsDateTimeAdapterOptions; export declare class DayjsDateTimeAdapter extends DateTimeAdapter<Dayjs> { private owlDateTimeLocale; private options?; private _localeData; constructor(owlDateTimeLocale: string, options?: OwlDayjsDateTimeAdapterOptions); setLocale(locale: string): void; getYear(date: Dayjs): number; getMonth(date: Dayjs): number; getDay(date: Dayjs): number; getDate(date: Dayjs): number; getHours(date: Dayjs): number; getMinutes(date: Dayjs): number; getSeconds(date: Dayjs): number; getTime(date: Dayjs): number; getNumDaysInMonth(date: Dayjs): number; differenceInCalendarDays(dateLeft: Dayjs, dateRight: Dayjs): number; getYearName(date: Dayjs): string; getMonthNames(style: 'long' | 'short' | 'narrow'): string[]; getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[]; getDateNames(): string[]; toIso8601(date: Dayjs): string; isEqual(dateLeft: Dayjs, dateRight: Dayjs): boolean; isSameDay(dateLeft: Dayjs, dateRight: Dayjs): boolean; isValid(date: Dayjs): boolean; invalid(): Dayjs; isDateInstance(obj: any): boolean; addCalendarYears(date: Dayjs, amount: number): Dayjs; addCalendarMonths(date: Dayjs, amount: number): Dayjs; addCalendarDays(date: Dayjs, amount: number): Dayjs; setHours(date: Dayjs, amount: number): Dayjs; setMinutes(date: Dayjs, amount: number): Dayjs; setSeconds(date: Dayjs, amount: number): Dayjs; createDate(year: number, month: number, date: number): Dayjs; clone(date: Dayjs): Dayjs; now(): Dayjs; format(date: Dayjs, displayFormat: any): string; parse(value: any, parseFormat: any): Dayjs | null; /** * Returns the given value if given a valid Dayjs or null. Deserializes valid ISO 8601 strings * (https://www.ietf.org/rfc/rfc3339.txt) and valid Date objects into valid Dayjss and empty * string into null. Returns an invalid date for all other values. */ deserialize(value: any): Dayjs | null; /** Creates a Dayjs instance while respecting the current UTC settings. */ private createDayjs; static ɵfac: i0.ɵɵFactoryDeclaration<DayjsDateTimeAdapter, [{ optional: true; }, { optional: true; }]>; static ɵprov: i0.ɵɵInjectableDeclaration<DayjsDateTimeAdapter>; } //# sourceMappingURL=dayjs-date-time-adapter.class.d.ts.map