@esfaenza/material-dayjs-adapter 19.2.22 → 20.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -391,10 +391,10 @@ class DayJsDateAdapter extends DateAdapter {
|
|
|
391
391
|
valuesArray[i] = valueFunction(i);
|
|
392
392
|
return valuesArray;
|
|
393
393
|
}
|
|
394
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
395
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
394
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: DayJsDateAdapter, deps: [{ token: MAT_DATE_LOCALE }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
395
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: DayJsDateAdapter }); }
|
|
396
396
|
}
|
|
397
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
397
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: DayJsDateAdapter, decorators: [{
|
|
398
398
|
type: Injectable
|
|
399
399
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
400
400
|
type: Inject,
|
|
@@ -415,14 +415,14 @@ const MAT_DAYJS_DATE_FORMATS = {
|
|
|
415
415
|
}
|
|
416
416
|
};
|
|
417
417
|
class MatDayjsDateModule {
|
|
418
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
419
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
420
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
418
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: MatDayjsDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
419
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.24", ngImport: i0, type: MatDayjsDateModule }); }
|
|
420
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: MatDayjsDateModule, providers: [
|
|
421
421
|
{ provide: MAT_DATE_FORMATS, useValue: MAT_DAYJS_DATE_FORMATS },
|
|
422
422
|
{ provide: DateAdapter, useClass: DayJsDateAdapter, deps: [MAT_DATE_LOCALE] }
|
|
423
423
|
] }); }
|
|
424
424
|
}
|
|
425
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
425
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: MatDayjsDateModule, decorators: [{
|
|
426
426
|
type: NgModule,
|
|
427
427
|
args: [{
|
|
428
428
|
providers: [
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,285 @@
|
|
|
1
|
+
import { DateAdapter, MatDateFormats } from '@angular/material/core';
|
|
2
|
+
import { Dayjs } from 'dayjs';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
|
-
*
|
|
6
|
+
* Adapter per permettere a Material di funzionare senza problemi con DayJs. Per altri provider di date (es. moment) l'adapter viene fornito
|
|
7
|
+
* nativamente da Angular. Per DayJs invece bisogna reimplementarselo
|
|
3
8
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
9
|
+
declare class DayJsDateAdapter extends DateAdapter<Dayjs> {
|
|
10
|
+
/**
|
|
11
|
+
* Cache dei dati del locale Italiano
|
|
12
|
+
*/
|
|
13
|
+
private _localeData;
|
|
14
|
+
/**
|
|
15
|
+
* Costruttore
|
|
16
|
+
*
|
|
17
|
+
* @ignore
|
|
18
|
+
*/
|
|
19
|
+
constructor(dateLocale: string);
|
|
20
|
+
/**
|
|
21
|
+
* Imposta il locale utilizzato per tutte le date
|
|
22
|
+
*
|
|
23
|
+
* @param {string} locale Locale da impostare
|
|
24
|
+
*/
|
|
25
|
+
setLocale(locale: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Effettua il caricamento del localeData coi nomi dei mesi, giorni ecc partendo dal modulo importato
|
|
28
|
+
*
|
|
29
|
+
* @param {any} mod Modulo caricato contenente il locale desiderato
|
|
30
|
+
*/
|
|
31
|
+
private loadLoacleDataModule;
|
|
32
|
+
/**
|
|
33
|
+
* Ottiene le ore da un DayJs
|
|
34
|
+
*
|
|
35
|
+
* @param {Dayjs} date Data Dayjs
|
|
36
|
+
*
|
|
37
|
+
* @returns {number} Ore
|
|
38
|
+
*/
|
|
39
|
+
getHours(date: Dayjs): number;
|
|
40
|
+
/**
|
|
41
|
+
* Deserializza una data in DayJs
|
|
42
|
+
*
|
|
43
|
+
* @param {any} value Valore di data a caso
|
|
44
|
+
*
|
|
45
|
+
* @returns {Dayjs} data in dayjs
|
|
46
|
+
*/
|
|
47
|
+
deserialize(value: any): any;
|
|
48
|
+
/**
|
|
49
|
+
* Ottiene i minuti da un DayJs
|
|
50
|
+
*
|
|
51
|
+
* @param {Dayjs} date Data Dayjs
|
|
52
|
+
*
|
|
53
|
+
* @returns {number} Minuti
|
|
54
|
+
*/
|
|
55
|
+
getMinutes(date: Dayjs): number;
|
|
56
|
+
/**
|
|
57
|
+
* Ottiene i secondi da un DayJs
|
|
58
|
+
*
|
|
59
|
+
* @param {Dayjs} date Data Dayjs
|
|
60
|
+
*
|
|
61
|
+
* @returns {number} Secondi
|
|
62
|
+
*/
|
|
63
|
+
getSeconds(date: Dayjs): number;
|
|
64
|
+
setTime(target: Dayjs, hours: number, minutes: number, seconds: number): Dayjs;
|
|
65
|
+
/**
|
|
66
|
+
* Imposta le ore di una data Dayjs
|
|
67
|
+
*
|
|
68
|
+
* @param {Dayjs} date Data da modificare
|
|
69
|
+
* @param {number} value Valore da impostare per le ore
|
|
70
|
+
*/
|
|
71
|
+
setHour(date: Dayjs, value: number): void;
|
|
72
|
+
/**
|
|
73
|
+
* Imposta i minuti di una data Dayjs
|
|
74
|
+
*
|
|
75
|
+
* @param {Dayjs} date Data da modificare
|
|
76
|
+
* @param {number} value Valore da impostare per i minuti
|
|
77
|
+
*/
|
|
78
|
+
setMinute(date: Dayjs, value: number): void;
|
|
79
|
+
/**
|
|
80
|
+
* Imposta i secondi di una data Dayjs
|
|
81
|
+
*
|
|
82
|
+
* @param {Dayjs} date Data da modificare
|
|
83
|
+
* @param {number} value Valore da impostare per i secondi
|
|
84
|
+
*/
|
|
85
|
+
setSecond(date: Dayjs, value: number): void;
|
|
86
|
+
/**
|
|
87
|
+
* Ottiene l'anno da un DayJs
|
|
88
|
+
*
|
|
89
|
+
* @param {Dayjs} date Data Dayjs
|
|
90
|
+
*
|
|
91
|
+
* @returns {number} Anno
|
|
92
|
+
*/
|
|
93
|
+
getYear(date: Dayjs): number;
|
|
94
|
+
/**
|
|
95
|
+
* Ottiene il mese da un DayJs
|
|
96
|
+
*
|
|
97
|
+
* @param {Dayjs} date Data Dayjs
|
|
98
|
+
*
|
|
99
|
+
* @returns {number} Mese
|
|
100
|
+
*/
|
|
101
|
+
getMonth(date: Dayjs): number;
|
|
102
|
+
/**
|
|
103
|
+
* Ottiene il giorno da un DayJs
|
|
104
|
+
*
|
|
105
|
+
* @param {Dayjs} date Data Dayjs
|
|
106
|
+
*
|
|
107
|
+
* @returns {number} Giorno
|
|
108
|
+
*/
|
|
109
|
+
getDate(date: Dayjs): number;
|
|
110
|
+
/**
|
|
111
|
+
* Ottiene il giorno della settimana da un DayJs
|
|
112
|
+
*
|
|
113
|
+
* @param {Dayjs} date Data Dayjs
|
|
114
|
+
*
|
|
115
|
+
* @returns {number} Giorno della settimana da 1 a 7
|
|
116
|
+
*/
|
|
117
|
+
getDayOfWeek(date: Dayjs): number;
|
|
118
|
+
/**
|
|
119
|
+
* Ottiene i nomi dei mesi
|
|
120
|
+
*
|
|
121
|
+
* @param {"long" | "short" | "narrow"} style Stile dei nomi richiesto
|
|
122
|
+
*
|
|
123
|
+
* @returns {string[]} Lista dei mesi espressi in base al parametro **style**
|
|
124
|
+
*/
|
|
125
|
+
getMonthNames(style: "long" | "short" | "narrow"): string[];
|
|
126
|
+
/**
|
|
127
|
+
* Ottiene i nomi dei giorni del mese
|
|
128
|
+
*
|
|
129
|
+
* @returns {string[]} Lista dei giorni del mese (da '1' a '31')
|
|
130
|
+
*/
|
|
131
|
+
getDateNames(): string[];
|
|
132
|
+
/**
|
|
133
|
+
* Ottiene i nomi dei giorni della settimana
|
|
134
|
+
*
|
|
135
|
+
* @param {"long" | "short" | "narrow"} style Stile dei nomi richiesto
|
|
136
|
+
*
|
|
137
|
+
* @returns {string[]} Lista dei giorni della settimana espressi in base al parametro **style**
|
|
138
|
+
*/
|
|
139
|
+
getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
|
|
140
|
+
/**
|
|
141
|
+
* Ottiene il nome dell'anno
|
|
142
|
+
*
|
|
143
|
+
* @param {Dayjs} date Data Dayjs
|
|
144
|
+
*
|
|
145
|
+
* @returns {string} Anno
|
|
146
|
+
*/
|
|
147
|
+
getYearName(date: Dayjs): string;
|
|
148
|
+
/**
|
|
149
|
+
* Ottiene il primo giorno della settimana
|
|
150
|
+
*
|
|
151
|
+
* @returns {number} Indice del primo giorno della settimana
|
|
152
|
+
*/
|
|
153
|
+
getFirstDayOfWeek(): number;
|
|
154
|
+
/**
|
|
155
|
+
* Ottiene il numero di giorni nel mese corrente
|
|
156
|
+
*
|
|
157
|
+
* @param {Dayjs} date Data Dayjs
|
|
158
|
+
*
|
|
159
|
+
* @returns {number} Numero di giorni
|
|
160
|
+
*/
|
|
161
|
+
getNumDaysInMonth(date: Dayjs): number;
|
|
162
|
+
/**
|
|
163
|
+
* Ottiene il clone di una data Dayjs
|
|
164
|
+
*
|
|
165
|
+
* @param {Dayjs} Data da clonare
|
|
166
|
+
*
|
|
167
|
+
* @returns {Dayjs} Clone
|
|
168
|
+
*/
|
|
169
|
+
clone(date: Dayjs): Dayjs;
|
|
170
|
+
/**
|
|
171
|
+
* Crea una data partendo da anno, mese e giorno
|
|
172
|
+
*
|
|
173
|
+
* @param {number} year Anno
|
|
174
|
+
* @param {number} month Mese
|
|
175
|
+
* @param {number} date Giorno
|
|
176
|
+
*
|
|
177
|
+
* @returns {Dayjs} Oggetto generato in base ai parametri **year**, **month**, e **date**
|
|
178
|
+
*/
|
|
179
|
+
createDate(year: number, month: number, date: number): Dayjs;
|
|
180
|
+
/**
|
|
181
|
+
* Restituisce la data che rappresenta la giornata di oggi
|
|
182
|
+
*
|
|
183
|
+
* @returns {Dayjs} Oggi
|
|
184
|
+
*/
|
|
185
|
+
today(): Dayjs;
|
|
186
|
+
/**
|
|
187
|
+
* Effettua il parse di una data, eventualmente in base al formato specificato
|
|
188
|
+
*
|
|
189
|
+
* @param {any} value Valore da parsare
|
|
190
|
+
* @param {string} parseFormat Formato in cui leggere il valore
|
|
191
|
+
*
|
|
192
|
+
* @returns {Dayjs} Data generata
|
|
193
|
+
*/
|
|
194
|
+
parse(value: any, parseFormat: string): Dayjs;
|
|
195
|
+
/**
|
|
196
|
+
* Formatta una data in base al formato specificato
|
|
197
|
+
*
|
|
198
|
+
* @param {Dayjs} date Data da formattare
|
|
199
|
+
* @param {string} displayFormat Formato in cui mostrare la data
|
|
200
|
+
*
|
|
201
|
+
* @returns {string} Data formattata
|
|
202
|
+
*/
|
|
203
|
+
format(date: Dayjs, displayFormat: any): string;
|
|
204
|
+
/**
|
|
205
|
+
* Aggiunge ad una data il numero specificato di anni
|
|
206
|
+
*
|
|
207
|
+
* @param {Dayjs} date Data a cui aggiungere gli anni
|
|
208
|
+
* @param {number} years Anni da aggiungere
|
|
209
|
+
*
|
|
210
|
+
* @returns {Dayjs} Data con l'aggiunta degli anni specificati
|
|
211
|
+
*/
|
|
212
|
+
addCalendarYears(date: Dayjs, years: number): Dayjs;
|
|
213
|
+
/**
|
|
214
|
+
* Aggiunge ad una data il numero specificato di mesi
|
|
215
|
+
*
|
|
216
|
+
* @param {Dayjs} date Data a cui aggiungere i mesi
|
|
217
|
+
* @param {months} months Mesi da aggiungere
|
|
218
|
+
*
|
|
219
|
+
* @returns {Dayjs} Data con l'aggiunta dei mesi specificati
|
|
220
|
+
*/
|
|
221
|
+
addCalendarMonths(date: Dayjs, months: number): Dayjs;
|
|
222
|
+
/**
|
|
223
|
+
* Aggiunge ad una data il numero specificato di giorni
|
|
224
|
+
*
|
|
225
|
+
* @param {Dayjs} date Data a cui aggiungere i giorni
|
|
226
|
+
* @param {months} days Giorni da aggiungere
|
|
227
|
+
*
|
|
228
|
+
* @returns {Dayjs} Data con l'aggiunta dei giorni specificati
|
|
229
|
+
*/
|
|
230
|
+
addCalendarDays(date: Dayjs, days: number): Dayjs;
|
|
231
|
+
/**
|
|
232
|
+
* Trasforma la data specificata in una stringa ISO8601
|
|
233
|
+
*
|
|
234
|
+
* @param {Dayjs} date Data
|
|
235
|
+
*
|
|
236
|
+
* @returns {string} Rappresentazione in ISO8601
|
|
237
|
+
*/
|
|
238
|
+
toIso8601(date: Dayjs): string;
|
|
239
|
+
/**
|
|
240
|
+
* Controlla se l'oggetto passato è effettivamente un DayJs
|
|
241
|
+
*
|
|
242
|
+
* @param {any} obj Oggetto da verificare se è una data o meno
|
|
243
|
+
*
|
|
244
|
+
* @returns {boolean} **true** se l'oggetto è un DayJs, **false** altrimenti
|
|
245
|
+
*/
|
|
246
|
+
isDateInstance(obj: any): boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Controlla il DayJs passato e verifica se è valido
|
|
249
|
+
*
|
|
250
|
+
* @param {Dayjs} date Data da verificare
|
|
251
|
+
*
|
|
252
|
+
* @returns {boolean} **true** se il DayJs è valido, **false** altrimenti
|
|
253
|
+
*/
|
|
254
|
+
isValid(date: Dayjs): boolean;
|
|
255
|
+
/**
|
|
256
|
+
* Restituisce un DayJs invalido
|
|
257
|
+
*
|
|
258
|
+
* @returns {DayJs} Data Invalida
|
|
259
|
+
*/
|
|
260
|
+
invalid(): Dayjs;
|
|
261
|
+
/**
|
|
262
|
+
* Crea un range di una lunghezza specifica e per ogni indice del range richiama un callback che valorizza l'elemento di quell'indice
|
|
263
|
+
*
|
|
264
|
+
* @param {number} length Lunghezza del range
|
|
265
|
+
* @param {Function} valueFunction Callback che deve generare il valore desiderato per ogni indice
|
|
266
|
+
*
|
|
267
|
+
* @returns {T[]} Array dei valori generati
|
|
268
|
+
*/
|
|
269
|
+
private range;
|
|
270
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DayJsDateAdapter, never>;
|
|
271
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DayJsDateAdapter>;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Formati di default per la presentazione degli input quali il DatePicker di Angular Material.
|
|
276
|
+
* Cablati a quelli italiani ignorando quelli di BurgerLand per non impazzire
|
|
277
|
+
*/
|
|
278
|
+
declare const MAT_DAYJS_DATE_FORMATS: MatDateFormats;
|
|
279
|
+
declare class MatDayjsDateModule {
|
|
280
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatDayjsDateModule, never>;
|
|
281
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MatDayjsDateModule, never, never, never>;
|
|
282
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MatDayjsDateModule>;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export { DayJsDateAdapter, MAT_DAYJS_DATE_FORMATS, MatDayjsDateModule };
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esfaenza/material-dayjs-adapter",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.3.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"tslib": "^2.0.0"
|
|
6
6
|
},
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@angular/common": "^
|
|
9
|
-
"@angular/core": "^
|
|
10
|
-
"@angular/material": "^
|
|
8
|
+
"@angular/common": "^20.3.24",
|
|
9
|
+
"@angular/core": "^20.3.24",
|
|
10
|
+
"@angular/material": "^20.2.14",
|
|
11
11
|
"dayjs": "1.11.21"
|
|
12
12
|
},
|
|
13
13
|
"module": "fesm2022/esfaenza-material-dayjs-adapter.mjs",
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
import { DateAdapter } from "@angular/material/core";
|
|
2
|
-
import { Dayjs } from "dayjs";
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* Adapter per permettere a Material di funzionare senza problemi con DayJs. Per altri provider di date (es. moment) l'adapter viene fornito
|
|
6
|
-
* nativamente da Angular. Per DayJs invece bisogna reimplementarselo
|
|
7
|
-
*/
|
|
8
|
-
export declare class DayJsDateAdapter extends DateAdapter<Dayjs> {
|
|
9
|
-
/**
|
|
10
|
-
* Cache dei dati del locale Italiano
|
|
11
|
-
*/
|
|
12
|
-
private _localeData;
|
|
13
|
-
/**
|
|
14
|
-
* Costruttore
|
|
15
|
-
*
|
|
16
|
-
* @ignore
|
|
17
|
-
*/
|
|
18
|
-
constructor(dateLocale: string);
|
|
19
|
-
/**
|
|
20
|
-
* Imposta il locale utilizzato per tutte le date
|
|
21
|
-
*
|
|
22
|
-
* @param {string} locale Locale da impostare
|
|
23
|
-
*/
|
|
24
|
-
setLocale(locale: string): void;
|
|
25
|
-
/**
|
|
26
|
-
* Effettua il caricamento del localeData coi nomi dei mesi, giorni ecc partendo dal modulo importato
|
|
27
|
-
*
|
|
28
|
-
* @param {any} mod Modulo caricato contenente il locale desiderato
|
|
29
|
-
*/
|
|
30
|
-
private loadLoacleDataModule;
|
|
31
|
-
/**
|
|
32
|
-
* Ottiene le ore da un DayJs
|
|
33
|
-
*
|
|
34
|
-
* @param {Dayjs} date Data Dayjs
|
|
35
|
-
*
|
|
36
|
-
* @returns {number} Ore
|
|
37
|
-
*/
|
|
38
|
-
getHours(date: Dayjs): number;
|
|
39
|
-
/**
|
|
40
|
-
* Deserializza una data in DayJs
|
|
41
|
-
*
|
|
42
|
-
* @param {any} value Valore di data a caso
|
|
43
|
-
*
|
|
44
|
-
* @returns {Dayjs} data in dayjs
|
|
45
|
-
*/
|
|
46
|
-
deserialize(value: any): any;
|
|
47
|
-
/**
|
|
48
|
-
* Ottiene i minuti da un DayJs
|
|
49
|
-
*
|
|
50
|
-
* @param {Dayjs} date Data Dayjs
|
|
51
|
-
*
|
|
52
|
-
* @returns {number} Minuti
|
|
53
|
-
*/
|
|
54
|
-
getMinutes(date: Dayjs): number;
|
|
55
|
-
/**
|
|
56
|
-
* Ottiene i secondi da un DayJs
|
|
57
|
-
*
|
|
58
|
-
* @param {Dayjs} date Data Dayjs
|
|
59
|
-
*
|
|
60
|
-
* @returns {number} Secondi
|
|
61
|
-
*/
|
|
62
|
-
getSeconds(date: Dayjs): number;
|
|
63
|
-
setTime(target: Dayjs, hours: number, minutes: number, seconds: number): Dayjs;
|
|
64
|
-
/**
|
|
65
|
-
* Imposta le ore di una data Dayjs
|
|
66
|
-
*
|
|
67
|
-
* @param {Dayjs} date Data da modificare
|
|
68
|
-
* @param {number} value Valore da impostare per le ore
|
|
69
|
-
*/
|
|
70
|
-
setHour(date: Dayjs, value: number): void;
|
|
71
|
-
/**
|
|
72
|
-
* Imposta i minuti di una data Dayjs
|
|
73
|
-
*
|
|
74
|
-
* @param {Dayjs} date Data da modificare
|
|
75
|
-
* @param {number} value Valore da impostare per i minuti
|
|
76
|
-
*/
|
|
77
|
-
setMinute(date: Dayjs, value: number): void;
|
|
78
|
-
/**
|
|
79
|
-
* Imposta i secondi di una data Dayjs
|
|
80
|
-
*
|
|
81
|
-
* @param {Dayjs} date Data da modificare
|
|
82
|
-
* @param {number} value Valore da impostare per i secondi
|
|
83
|
-
*/
|
|
84
|
-
setSecond(date: Dayjs, value: number): void;
|
|
85
|
-
/**
|
|
86
|
-
* Ottiene l'anno da un DayJs
|
|
87
|
-
*
|
|
88
|
-
* @param {Dayjs} date Data Dayjs
|
|
89
|
-
*
|
|
90
|
-
* @returns {number} Anno
|
|
91
|
-
*/
|
|
92
|
-
getYear(date: Dayjs): number;
|
|
93
|
-
/**
|
|
94
|
-
* Ottiene il mese da un DayJs
|
|
95
|
-
*
|
|
96
|
-
* @param {Dayjs} date Data Dayjs
|
|
97
|
-
*
|
|
98
|
-
* @returns {number} Mese
|
|
99
|
-
*/
|
|
100
|
-
getMonth(date: Dayjs): number;
|
|
101
|
-
/**
|
|
102
|
-
* Ottiene il giorno da un DayJs
|
|
103
|
-
*
|
|
104
|
-
* @param {Dayjs} date Data Dayjs
|
|
105
|
-
*
|
|
106
|
-
* @returns {number} Giorno
|
|
107
|
-
*/
|
|
108
|
-
getDate(date: Dayjs): number;
|
|
109
|
-
/**
|
|
110
|
-
* Ottiene il giorno della settimana da un DayJs
|
|
111
|
-
*
|
|
112
|
-
* @param {Dayjs} date Data Dayjs
|
|
113
|
-
*
|
|
114
|
-
* @returns {number} Giorno della settimana da 1 a 7
|
|
115
|
-
*/
|
|
116
|
-
getDayOfWeek(date: Dayjs): number;
|
|
117
|
-
/**
|
|
118
|
-
* Ottiene i nomi dei mesi
|
|
119
|
-
*
|
|
120
|
-
* @param {"long" | "short" | "narrow"} style Stile dei nomi richiesto
|
|
121
|
-
*
|
|
122
|
-
* @returns {string[]} Lista dei mesi espressi in base al parametro **style**
|
|
123
|
-
*/
|
|
124
|
-
getMonthNames(style: "long" | "short" | "narrow"): string[];
|
|
125
|
-
/**
|
|
126
|
-
* Ottiene i nomi dei giorni del mese
|
|
127
|
-
*
|
|
128
|
-
* @returns {string[]} Lista dei giorni del mese (da '1' a '31')
|
|
129
|
-
*/
|
|
130
|
-
getDateNames(): string[];
|
|
131
|
-
/**
|
|
132
|
-
* Ottiene i nomi dei giorni della settimana
|
|
133
|
-
*
|
|
134
|
-
* @param {"long" | "short" | "narrow"} style Stile dei nomi richiesto
|
|
135
|
-
*
|
|
136
|
-
* @returns {string[]} Lista dei giorni della settimana espressi in base al parametro **style**
|
|
137
|
-
*/
|
|
138
|
-
getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
|
|
139
|
-
/**
|
|
140
|
-
* Ottiene il nome dell'anno
|
|
141
|
-
*
|
|
142
|
-
* @param {Dayjs} date Data Dayjs
|
|
143
|
-
*
|
|
144
|
-
* @returns {string} Anno
|
|
145
|
-
*/
|
|
146
|
-
getYearName(date: Dayjs): string;
|
|
147
|
-
/**
|
|
148
|
-
* Ottiene il primo giorno della settimana
|
|
149
|
-
*
|
|
150
|
-
* @returns {number} Indice del primo giorno della settimana
|
|
151
|
-
*/
|
|
152
|
-
getFirstDayOfWeek(): number;
|
|
153
|
-
/**
|
|
154
|
-
* Ottiene il numero di giorni nel mese corrente
|
|
155
|
-
*
|
|
156
|
-
* @param {Dayjs} date Data Dayjs
|
|
157
|
-
*
|
|
158
|
-
* @returns {number} Numero di giorni
|
|
159
|
-
*/
|
|
160
|
-
getNumDaysInMonth(date: Dayjs): number;
|
|
161
|
-
/**
|
|
162
|
-
* Ottiene il clone di una data Dayjs
|
|
163
|
-
*
|
|
164
|
-
* @param {Dayjs} Data da clonare
|
|
165
|
-
*
|
|
166
|
-
* @returns {Dayjs} Clone
|
|
167
|
-
*/
|
|
168
|
-
clone(date: Dayjs): Dayjs;
|
|
169
|
-
/**
|
|
170
|
-
* Crea una data partendo da anno, mese e giorno
|
|
171
|
-
*
|
|
172
|
-
* @param {number} year Anno
|
|
173
|
-
* @param {number} month Mese
|
|
174
|
-
* @param {number} date Giorno
|
|
175
|
-
*
|
|
176
|
-
* @returns {Dayjs} Oggetto generato in base ai parametri **year**, **month**, e **date**
|
|
177
|
-
*/
|
|
178
|
-
createDate(year: number, month: number, date: number): Dayjs;
|
|
179
|
-
/**
|
|
180
|
-
* Restituisce la data che rappresenta la giornata di oggi
|
|
181
|
-
*
|
|
182
|
-
* @returns {Dayjs} Oggi
|
|
183
|
-
*/
|
|
184
|
-
today(): Dayjs;
|
|
185
|
-
/**
|
|
186
|
-
* Effettua il parse di una data, eventualmente in base al formato specificato
|
|
187
|
-
*
|
|
188
|
-
* @param {any} value Valore da parsare
|
|
189
|
-
* @param {string} parseFormat Formato in cui leggere il valore
|
|
190
|
-
*
|
|
191
|
-
* @returns {Dayjs} Data generata
|
|
192
|
-
*/
|
|
193
|
-
parse(value: any, parseFormat: string): Dayjs;
|
|
194
|
-
/**
|
|
195
|
-
* Formatta una data in base al formato specificato
|
|
196
|
-
*
|
|
197
|
-
* @param {Dayjs} date Data da formattare
|
|
198
|
-
* @param {string} displayFormat Formato in cui mostrare la data
|
|
199
|
-
*
|
|
200
|
-
* @returns {string} Data formattata
|
|
201
|
-
*/
|
|
202
|
-
format(date: Dayjs, displayFormat: any): string;
|
|
203
|
-
/**
|
|
204
|
-
* Aggiunge ad una data il numero specificato di anni
|
|
205
|
-
*
|
|
206
|
-
* @param {Dayjs} date Data a cui aggiungere gli anni
|
|
207
|
-
* @param {number} years Anni da aggiungere
|
|
208
|
-
*
|
|
209
|
-
* @returns {Dayjs} Data con l'aggiunta degli anni specificati
|
|
210
|
-
*/
|
|
211
|
-
addCalendarYears(date: Dayjs, years: number): Dayjs;
|
|
212
|
-
/**
|
|
213
|
-
* Aggiunge ad una data il numero specificato di mesi
|
|
214
|
-
*
|
|
215
|
-
* @param {Dayjs} date Data a cui aggiungere i mesi
|
|
216
|
-
* @param {months} months Mesi da aggiungere
|
|
217
|
-
*
|
|
218
|
-
* @returns {Dayjs} Data con l'aggiunta dei mesi specificati
|
|
219
|
-
*/
|
|
220
|
-
addCalendarMonths(date: Dayjs, months: number): Dayjs;
|
|
221
|
-
/**
|
|
222
|
-
* Aggiunge ad una data il numero specificato di giorni
|
|
223
|
-
*
|
|
224
|
-
* @param {Dayjs} date Data a cui aggiungere i giorni
|
|
225
|
-
* @param {months} days Giorni da aggiungere
|
|
226
|
-
*
|
|
227
|
-
* @returns {Dayjs} Data con l'aggiunta dei giorni specificati
|
|
228
|
-
*/
|
|
229
|
-
addCalendarDays(date: Dayjs, days: number): Dayjs;
|
|
230
|
-
/**
|
|
231
|
-
* Trasforma la data specificata in una stringa ISO8601
|
|
232
|
-
*
|
|
233
|
-
* @param {Dayjs} date Data
|
|
234
|
-
*
|
|
235
|
-
* @returns {string} Rappresentazione in ISO8601
|
|
236
|
-
*/
|
|
237
|
-
toIso8601(date: Dayjs): string;
|
|
238
|
-
/**
|
|
239
|
-
* Controlla se l'oggetto passato è effettivamente un DayJs
|
|
240
|
-
*
|
|
241
|
-
* @param {any} obj Oggetto da verificare se è una data o meno
|
|
242
|
-
*
|
|
243
|
-
* @returns {boolean} **true** se l'oggetto è un DayJs, **false** altrimenti
|
|
244
|
-
*/
|
|
245
|
-
isDateInstance(obj: any): boolean;
|
|
246
|
-
/**
|
|
247
|
-
* Controlla il DayJs passato e verifica se è valido
|
|
248
|
-
*
|
|
249
|
-
* @param {Dayjs} date Data da verificare
|
|
250
|
-
*
|
|
251
|
-
* @returns {boolean} **true** se il DayJs è valido, **false** altrimenti
|
|
252
|
-
*/
|
|
253
|
-
isValid(date: Dayjs): boolean;
|
|
254
|
-
/**
|
|
255
|
-
* Restituisce un DayJs invalido
|
|
256
|
-
*
|
|
257
|
-
* @returns {DayJs} Data Invalida
|
|
258
|
-
*/
|
|
259
|
-
invalid(): Dayjs;
|
|
260
|
-
/**
|
|
261
|
-
* Crea un range di una lunghezza specifica e per ogni indice del range richiama un callback che valorizza l'elemento di quell'indice
|
|
262
|
-
*
|
|
263
|
-
* @param {number} length Lunghezza del range
|
|
264
|
-
* @param {Function} valueFunction Callback che deve generare il valore desiderato per ogni indice
|
|
265
|
-
*
|
|
266
|
-
* @returns {T[]} Array dei valori generati
|
|
267
|
-
*/
|
|
268
|
-
private range;
|
|
269
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DayJsDateAdapter, never>;
|
|
270
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DayJsDateAdapter>;
|
|
271
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { MatDateFormats } from '@angular/material/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Formati di default per la presentazione degli input quali il DatePicker di Angular Material.
|
|
5
|
-
* Cablati a quelli italiani ignorando quelli di BurgerLand per non impazzire
|
|
6
|
-
*/
|
|
7
|
-
export declare const MAT_DAYJS_DATE_FORMATS: MatDateFormats;
|
|
8
|
-
export declare class MatDayjsDateModule {
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatDayjsDateModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MatDayjsDateModule, never, never, never>;
|
|
11
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<MatDayjsDateModule>;
|
|
12
|
-
}
|
package/public-api.d.ts
DELETED