@alfresco/adf-core
Version:
45 lines (44 loc) • 1.96 kB
TypeScript
import { DateAdapter } from '@angular/material/core';
import { UserPreferencesService } from '../services/user-preferences.service';
import * as i0 from "@angular/core";
type Moment = any;
/**
* @deprecated this class is deprecated and should not be used.
* Consider using `AdfDateFnsAdapter` or `AdfDateTimeFnsAdapter` instead
*/
export declare class MomentDateAdapter extends DateAdapter<Moment> {
private localeData;
overrideDisplayFormat: string;
constructor(preferences: UserPreferencesService);
getYear(date: Moment): number;
getMonth(date: Moment): number;
getDate(date: Moment): number;
getDayOfWeek(date: Moment): number;
getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
getDateNames(): string[];
getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
getYearName(date: Moment): string;
getFirstDayOfWeek(): number;
getNumDaysInMonth(date: Moment): number;
clone(date: Moment): Moment;
createDate(year: number, month: number, date: number): Moment;
today(): Moment;
parse(value: any, parseFormat: any): Moment;
format(date: Moment, displayFormat: any): string;
addCalendarYears(date: Moment, years: number): Moment;
addCalendarMonths(date: Moment, months: number): Moment;
addCalendarDays(date: Moment, days: number): Moment;
getISODateString(date: Moment): string;
setLocale(locale: any): void;
compareDate(first: Moment, second: Moment): number;
sameDate(first: any | Moment, second: any | Moment): boolean;
clampDate(date: Moment, min?: any | Moment, max?: any | Moment): Moment;
isDateInstance(date: any): boolean;
isValid(date: Moment): boolean;
toIso8601(date: Moment): string;
fromIso8601(iso8601String: string): Moment | null;
invalid(): Moment;
static ɵfac: i0.ɵɵFactoryDeclaration<MomentDateAdapter, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<MomentDateAdapter>;
}
export {};