1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { InjectionToken } from '@angular/core';
|
9 | import { DateAdapter } from '@angular/material/core';
|
10 | import { Moment } from 'moment';
|
11 |
|
12 | export interface MatMomentDateAdapterOptions {
|
13 | |
14 |
|
15 |
|
16 |
|
17 | strict?: boolean;
|
18 | |
19 |
|
20 |
|
21 |
|
22 |
|
23 | useUtc?: boolean;
|
24 | }
|
25 |
|
26 | export declare const MAT_MOMENT_DATE_ADAPTER_OPTIONS: InjectionToken<MatMomentDateAdapterOptions>;
|
27 |
|
28 | export declare function MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY(): MatMomentDateAdapterOptions;
|
29 |
|
30 | export declare class MomentDateAdapter extends DateAdapter<Moment> {
|
31 | private _options?;
|
32 | private _localeData;
|
33 | constructor(dateLocale: string, _options?: MatMomentDateAdapterOptions | undefined);
|
34 | setLocale(locale: string): void;
|
35 | getYear(date: Moment): number;
|
36 | getMonth(date: Moment): number;
|
37 | getDate(date: Moment): number;
|
38 | getDayOfWeek(date: Moment): number;
|
39 | getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
|
40 | getDateNames(): string[];
|
41 | getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
|
42 | getYearName(date: Moment): string;
|
43 | getFirstDayOfWeek(): number;
|
44 | getNumDaysInMonth(date: Moment): number;
|
45 | clone(date: Moment): Moment;
|
46 | createDate(year: number, month: number, date: number): Moment;
|
47 | today(): Moment;
|
48 | parse(value: any, parseFormat: string | string[]): Moment | null;
|
49 | format(date: Moment, displayFormat: string): string;
|
50 | addCalendarYears(date: Moment, years: number): Moment;
|
51 | addCalendarMonths(date: Moment, months: number): Moment;
|
52 | addCalendarDays(date: Moment, days: number): Moment;
|
53 | toIso8601(date: Moment): string;
|
54 | /**
|
55 | * Returns the given value if given a valid Moment or null. Deserializes valid ISO 8601 strings
|
56 | * (https:
|
57 | * string into null. Returns an invalid date for all other values.
|
58 | */
|
59 | deserialize(value: any): Moment | null;
|
60 | isDateInstance(obj: any): boolean;
|
61 | isValid(date: Moment): boolean;
|
62 | invalid(): Moment;
|
63 |
|
64 | private _createMoment;
|
65 | }
|
66 |
|
\ | No newline at end of file |