@dmlibs/dm-cmps 0.1.7 → 0.1.8
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.
|
@@ -2203,5 +2203,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
2203
2203
|
* Generated bundle index. Do not edit.
|
|
2204
2204
|
*/
|
|
2205
2205
|
|
|
2206
|
-
export { DmCmpsDataSource, DmColorPicker, DmIcon, DmMatSelect, DmSpinner, DmSpinnerService, DmTable };
|
|
2206
|
+
export { DmCmpsDataSource, DmColorPicker, DmDateService, DmIcon, DmMatSelect, DmSpinner, DmSpinnerService, DmTable };
|
|
2207
2207
|
//# sourceMappingURL=dmlibs-dm-cmps.mjs.map
|
package/package.json
CHANGED
|
@@ -1349,5 +1349,85 @@ declare class DmIcon {
|
|
|
1349
1349
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DmIcon, "dm-icon", never, { "icon": { "alias": "icon"; "required": true; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1350
1350
|
}
|
|
1351
1351
|
|
|
1352
|
-
|
|
1352
|
+
type DmCmpsDateTypes = any | Date | string | {
|
|
1353
|
+
_seconds: number;
|
|
1354
|
+
_nanoseconds: number;
|
|
1355
|
+
} | {
|
|
1356
|
+
seconds: number;
|
|
1357
|
+
nanoseconds: number;
|
|
1358
|
+
} | number | null;
|
|
1359
|
+
type DmCmpsDateFormats = 'dd/MM/yyyy' | 'yyyy/MM/dd' | 'dd/MM/yyyy HH:mm';
|
|
1360
|
+
type DmCmpsLangs = 'en' | 'he' | 'ar';
|
|
1361
|
+
declare global {
|
|
1362
|
+
interface Date {
|
|
1363
|
+
getWeekOfYear(): number;
|
|
1364
|
+
getWeekOfMonth(): number;
|
|
1365
|
+
getDayOfYear(): number;
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
declare class DmDateService {
|
|
1369
|
+
getDate(date: DmCmpsDateTypes): Date | null;
|
|
1370
|
+
/**
|
|
1371
|
+
*
|
|
1372
|
+
* @param date the date to transform
|
|
1373
|
+
* @param format the format of the date
|
|
1374
|
+
* @param lang the language of the date
|
|
1375
|
+
* @returns the date as a string
|
|
1376
|
+
*
|
|
1377
|
+
* @example
|
|
1378
|
+
* The format can be any string that contains the following:
|
|
1379
|
+
* - 'dd' - the day of the month
|
|
1380
|
+
* - 'MM' - the month
|
|
1381
|
+
* - 'yyyy' - the year
|
|
1382
|
+
* - 'yy' - the year (2 digits)
|
|
1383
|
+
* - 'HH' - the hour
|
|
1384
|
+
* - 'mm' - the minute
|
|
1385
|
+
* - 'ss' - the second
|
|
1386
|
+
* - 'SSS' - the millisecond
|
|
1387
|
+
* - 'DM_a' - the AM/PM
|
|
1388
|
+
* - 'DM_E' - the day of the week
|
|
1389
|
+
* - 'DM_Z' - the time zone
|
|
1390
|
+
* - 'DM_z' - the time zone offset
|
|
1391
|
+
* - 'DM_yw' - the week of the year
|
|
1392
|
+
* - 'DM_mw' - the week of the month
|
|
1393
|
+
* - 'DM_yd' - the day of the year
|
|
1394
|
+
*/
|
|
1395
|
+
getDateString(date: DmCmpsDateTypes, format?: DmCmpsDateFormats | string, lang?: DmCmpsLangs): string;
|
|
1396
|
+
/**
|
|
1397
|
+
*
|
|
1398
|
+
* @param date the date to transform
|
|
1399
|
+
* @param format the format of the date
|
|
1400
|
+
* @param lang the language of the date
|
|
1401
|
+
* @returns the date as a string
|
|
1402
|
+
*
|
|
1403
|
+
* @example
|
|
1404
|
+
* The format can be any string that contains the following:
|
|
1405
|
+
* - 'dd' - the day of the month
|
|
1406
|
+
* - 'MM' - the month
|
|
1407
|
+
* - 'yyyy' - the year
|
|
1408
|
+
* - 'yy' - the year (2 digits)
|
|
1409
|
+
* - 'HH' - the hour
|
|
1410
|
+
* - 'mm' - the minute
|
|
1411
|
+
* - 'ss' - the second
|
|
1412
|
+
* - 'SSS' - the millisecond
|
|
1413
|
+
* - 'DM_a' - the AM/PM
|
|
1414
|
+
* - 'DM_E' - the day of the week
|
|
1415
|
+
* - 'DM_Z' - the time zone
|
|
1416
|
+
* - 'DM_z' - the time zone offset
|
|
1417
|
+
* - 'DM_yw' - the week of the year
|
|
1418
|
+
* - 'DM_mw' - the week of the month
|
|
1419
|
+
* - 'DM_yd' - the day of the year
|
|
1420
|
+
*/
|
|
1421
|
+
static getDateString(date: DmCmpsDateTypes, format?: DmCmpsDateFormats | string, lang?: DmCmpsLangs): string;
|
|
1422
|
+
static getDate(date: DmCmpsDateTypes): Date | null;
|
|
1423
|
+
static getTimeString(date: DmCmpsDateTypes): string;
|
|
1424
|
+
static now(): Date;
|
|
1425
|
+
now(): Date;
|
|
1426
|
+
getAge(date: DmCmpsDateTypes, fixed?: number | null, result?: 'string' | 'number'): number | string;
|
|
1427
|
+
static getAge(date: DmCmpsDateTypes, fixed?: number | null, result?: 'string' | 'number'): number | string;
|
|
1428
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DmDateService, never>;
|
|
1429
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DmDateService>;
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
export { DmCmpsDataSource, DmColorPicker, DmDateService, DmIcon, DmMatSelect, DmSpinner, DmSpinnerService, DmTable };
|
|
1353
1433
|
export type { DmCmpsDataSourceSort, DmTableActionButton, DmTableClasses, DmTableColumn, DmTableColumnHeaderMenuItem, DmTablePaginatorSettings, DmTableRowActionButton, DmTableStyle };
|