@controladad/ng-base
Version:
Everything you need for Angular
47 lines (46 loc) • 1.77 kB
TypeScript
import { DateAdapter } from '@angular/material/core';
import { Locale } from 'date-fns-jalali';
import * as i0 from "@angular/core";
export declare const DATEFNS_PERSIAN_DATE_FORMATS: {
parse: {
dateInput: string;
};
display: {
dateInput: string;
monthYearLabel: string;
dateA11yLabel: string;
monthYearA11yLabel: string;
};
};
export declare class DatefnsJalaliDateAdapter extends DateAdapter<Date> {
private _dateFnsLocale?;
private getLocale;
constructor(dateLocale: string);
setLocale(locale: string | Locale): void;
addCalendarDays(date: Date, days: number): Date;
addCalendarMonths(date: Date, months: number): Date;
addCalendarYears(date: Date, years: number): Date;
clone(date: Date): Date;
createDate(year: number, month: number, date: number): Date;
deserialize(value: any): Date | null;
format(date: Date, displayFormat: string): string;
getDate(date: Date): number;
getDateNames(): string[];
getDayOfWeek(date: Date): number;
getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
getFirstDayOfWeek(): number;
getMonth(date: Date): number;
getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
getNumDaysInMonth(date: Date): number;
getYear(date: Date): number;
getYearName(date: Date): string;
invalid(): Date;
isDateInstance(obj: any): boolean;
isValid(date: Date): boolean;
parse(value: any, parseFormat: any): Date | null;
toIso8601(date: Date): string;
today(): Date;
private _createDateWithOverflow;
static ɵfac: i0.ɵɵFactoryDeclaration<DatefnsJalaliDateAdapter, [{ optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<DatefnsJalaliDateAdapter>;
}