-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.d.ts
executable file
·91 lines (82 loc) · 3.83 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import { DateAdapter } from '@angular/material/core';
import * as i0 from '@angular/core';
import { InjectionToken } from '@angular/core';
import { MatDateFormats } from '@angular/material/core';
import { Moment } from 'moment';
import { Provider } from '@angular/core';
/** InjectionToken for moment date adapter to configure options. */
export declare const MAT_MOMENT_DATE_ADAPTER_OPTIONS: InjectionToken<MatMomentDateAdapterOptions>;
/** @docs-private */
export declare function MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY(): MatMomentDateAdapterOptions;
export declare const MAT_MOMENT_DATE_FORMATS: MatDateFormats;
/** Configurable options for MomentDateAdapter. */
export declare interface MatMomentDateAdapterOptions {
/**
* When enabled, the dates have to match the format exactly.
* See https://momentjs.com/guides/#/parsing/strict-mode/.
*/
strict?: boolean;
/**
* Turns the use of utc dates on or off.
* Changing this will change how Angular Material components like DatePicker output dates.
* Defaults to `false`.
*/
useUtc?: boolean;
}
export declare class MatMomentDateModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MatMomentDateModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MatMomentDateModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MatMomentDateModule>;
}
/** Adapts Moment.js Dates for use with Angular Material. */
export declare class MomentDateAdapter extends DateAdapter<Moment> {
private _options;
private _localeData;
constructor(...args: unknown[]);
setLocale(locale: string): void;
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: string | string[]): Moment | null;
format(date: Moment, displayFormat: string): string;
addCalendarYears(date: Moment, years: number): Moment;
addCalendarMonths(date: Moment, months: number): Moment;
addCalendarDays(date: Moment, days: number): Moment;
toIso8601(date: Moment): string;
/**
* Returns the given value if given a valid Moment or null. Deserializes valid ISO 8601 strings
* (https://www.ietf.org/rfc/rfc3339.txt) and valid Date objects into valid Moments and empty
* string into null. Returns an invalid date for all other values.
*/
deserialize(value: any): Moment | null;
isDateInstance(obj: any): boolean;
isValid(date: Moment): boolean;
invalid(): Moment;
setTime(target: Moment, hours: number, minutes: number, seconds: number): Moment;
getHours(date: Moment): number;
getMinutes(date: Moment): number;
getSeconds(date: Moment): number;
parseTime(value: any, parseFormat: string | string[]): Moment | null;
addSeconds(date: Moment, amount: number): Moment;
/** Creates a Moment instance while respecting the current UTC settings. */
private _createMoment;
static ɵfac: i0.ɵɵFactoryDeclaration<MomentDateAdapter, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<MomentDateAdapter>;
}
export declare class MomentDateModule {
static ɵfac: i0.ɵɵFactoryDeclaration<MomentDateModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<MomentDateModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<MomentDateModule>;
}
export declare function provideMomentDateAdapter(formats?: MatDateFormats, options?: MatMomentDateAdapterOptions): Provider[];
export { }