@acorex/core 18.12.13 → 18.12.14
Sign up to get free protection for your applications and to get access to all the features.
@@ -6,10 +6,9 @@ export class AXTimeLeftFormatter {
|
|
6
6
|
return 'timeleft';
|
7
7
|
}
|
8
8
|
format(value, options) {
|
9
|
-
const
|
10
|
-
|
11
|
-
|
12
|
-
}
|
9
|
+
const valueNumber = Number(value);
|
10
|
+
const sign = valueNumber >= 0 ? 'left' : 'ago';
|
11
|
+
const milliseconds = Math.abs(valueNumber);
|
13
12
|
const durationInSeconds = Math.round(milliseconds / 1000);
|
14
13
|
let format = options?.format;
|
15
14
|
// Determine the best format if format is null
|
@@ -31,53 +30,53 @@ export class AXTimeLeftFormatter {
|
|
31
30
|
const pad = (num) => num.toString().padStart(2, '0');
|
32
31
|
switch (format) {
|
33
32
|
case 's':
|
34
|
-
return `${durationInSeconds} seconds
|
33
|
+
return `${durationInSeconds} seconds ${sign}`;
|
35
34
|
case 'ss':
|
36
|
-
return `${pad(durationInSeconds)} seconds
|
35
|
+
return `${pad(durationInSeconds)} seconds ${sign}`;
|
37
36
|
case 'm':
|
38
|
-
return `${Math.round(durationInSeconds / 60)} minute${durationInSeconds >= 120 ? 's' : ''}
|
37
|
+
return `${Math.round(durationInSeconds / 60)} minute${durationInSeconds >= 120 ? 's' : ''} ${sign}`;
|
39
38
|
case 'mm':
|
40
|
-
return `${pad(Math.round(durationInSeconds / 60))} minutes
|
39
|
+
return `${pad(Math.round(durationInSeconds / 60))} minutes ${sign}`;
|
41
40
|
case 'h':
|
42
41
|
case 'H':
|
43
42
|
if (durationInSeconds < 60 * 89)
|
44
|
-
return
|
45
|
-
return `${Math.round(durationInSeconds / 3600)} hour${durationInSeconds >= 60 * 180 ? 's' : ''}
|
43
|
+
return `an hour ${sign}`;
|
44
|
+
return `${Math.round(durationInSeconds / 3600)} hour${durationInSeconds >= 60 * 180 ? 's' : ''} ${sign}`;
|
46
45
|
case 'hh':
|
47
46
|
case 'HH':
|
48
47
|
if (durationInSeconds < 60 * 89)
|
49
|
-
return
|
50
|
-
return `${pad(Math.round(durationInSeconds / 3600))} hours
|
48
|
+
return `01 hour ${sign}`;
|
49
|
+
return `${pad(Math.round(durationInSeconds / 3600))} hours ${sign}`;
|
51
50
|
case 'd':
|
52
51
|
case 'D':
|
53
52
|
if (durationInSeconds < 60 * 60 * 35)
|
54
|
-
return
|
55
|
-
return `${Math.round(durationInSeconds / (3600 * 24))} day${durationInSeconds >= 60 * 60 * 70 ? 's' : ''}
|
53
|
+
return `a day ${sign}`;
|
54
|
+
return `${Math.round(durationInSeconds / (3600 * 24))} day${durationInSeconds >= 60 * 60 * 70 ? 's' : ''} ${sign}`;
|
56
55
|
case 'dd':
|
57
56
|
case 'DD':
|
58
57
|
if (durationInSeconds < 60 * 60 * 35)
|
59
|
-
return
|
60
|
-
return `${pad(Math.round(durationInSeconds / (3600 * 24)))} days
|
58
|
+
return `01 day ${sign}`;
|
59
|
+
return `${pad(Math.round(durationInSeconds / (3600 * 24)))} days ${sign}`;
|
61
60
|
case 'M':
|
62
61
|
if (durationInSeconds < 60 * 60 * 24 * 45)
|
63
|
-
return
|
64
|
-
return `${Math.round(durationInSeconds / (3600 * 24 * 30))} month${durationInSeconds >= 60 * 60 * 24 * 90 ? 's' : ''}
|
62
|
+
return `a month ${sign}`;
|
63
|
+
return `${Math.round(durationInSeconds / (3600 * 24 * 30))} month${durationInSeconds >= 60 * 60 * 24 * 90 ? 's' : ''} ${sign}`;
|
65
64
|
case 'MM':
|
66
65
|
if (durationInSeconds < 60 * 60 * 24 * 45)
|
67
|
-
return
|
68
|
-
return `${pad(Math.round(durationInSeconds / (3600 * 24 * 30)))} months
|
66
|
+
return `01 month ${sign}`;
|
67
|
+
return `${pad(Math.round(durationInSeconds / (3600 * 24 * 30)))} months ${sign}`;
|
69
68
|
case 'y':
|
70
69
|
case 'Y':
|
71
70
|
if (durationInSeconds < 60 * 60 * 24 * 547)
|
72
|
-
return
|
73
|
-
return `${Math.round(durationInSeconds / (3600 * 24 * 365))} year${durationInSeconds >= 60 * 60 * 24 * 730 ? 's' : ''}
|
71
|
+
return `a year ${sign}`;
|
72
|
+
return `${Math.round(durationInSeconds / (3600 * 24 * 365))} year${durationInSeconds >= 60 * 60 * 24 * 730 ? 's' : ''} ${sign}`;
|
74
73
|
case 'yy':
|
75
74
|
case 'YY':
|
76
75
|
case 'yyyy':
|
77
76
|
case 'YYYY':
|
78
77
|
if (durationInSeconds < 60 * 60 * 24 * 547)
|
79
|
-
return
|
80
|
-
return `${pad(Math.round(durationInSeconds / (3600 * 24 * 365)))} years
|
78
|
+
return `01 year ${sign}`;
|
79
|
+
return `${pad(Math.round(durationInSeconds / (3600 * 24 * 365)))} years ${sign}`;
|
81
80
|
default:
|
82
81
|
return 'Invalid format';
|
83
82
|
}
|
@@ -88,4 +87,4 @@ export class AXTimeLeftFormatter {
|
|
88
87
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXTimeLeftFormatter, decorators: [{
|
89
88
|
type: Injectable
|
90
89
|
}] });
|
91
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZWxlZnQtZm9ybWF0dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL2RhdGUtdGltZS9zcmMvbGliL2Zvcm1hdHRlcnMvdGltZWxlZnQtZm9ybWF0dGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLFdBQVcsQ0FBQzs7QUFhbEMsTUFBTSxPQUFPLG1CQUFtQjtJQUM5QixJQUFJLElBQUk7UUFDTixPQUFPLFVBQVUsQ0FBQztJQUNwQixDQUFDO0lBRUQsTUFBTSxDQUFDLEtBQXNCLEVBQUUs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kluU2Vjb25kcyA8IDYwICogNjAgKiAyNCAqIDQ1KSByZXR1cm4gYDAxIG1vbnRoICR7c2lnbn1gO1xuICAgICAgICByZXR1cm4gYCR7cGFkKE1hdGgucm91bmQoZHVyYXRpb25JblNlY29uZHMgLyAoMzYwMCAqIDI0ICogMzApKSl9IG1vbnRocyAke3NpZ259YDtcbiAgICAgIGNhc2UgJ3knOlxuICAgICAgY2FzZSAnWSc6XG4gICAgICAgIGlmIChkdXJhdGlvbkluU2Vjb25kcyA8IDYwICogNjAgKiAyNCAqIDU0NykgcmV0dXJuIGBhIHllYXIgJHtzaWdufWA7XG4gICAgICAgIHJldHVybiBgJHtNYXRoLnJvdW5kKGR1cmF0aW9uSW5TZWNvbmRzIC8gKDM2MDAgKiAyNCAqIDM2NSkpfSB5ZWFyJHtkdXJhdGlvbkluU2Vjb25kcyA+PSA2MCAqIDYwICogMjQgKiA3MzAgPyAncycgOiAnJ30gJHtzaWdufWA7XG4gICAgICBjYXNlICd5eSc6XG4gICAgICBjYXNlICdZWSc6XG4gICAgICBjYXNlICd5eXl5JzpcbiAgICAgIGNhc2UgJ1lZWVknOlxuICAgICAgICBpZiAoZHVyYXRpb25JblNlY29uZHMgPCA2MCAqIDYwICogMjQgKiA1NDcpIHJldHVybiBgMDEgeWVhciAke3NpZ259YDtcbiAgICAgICAgcmV0dXJuIGAke3BhZChNYXRoLnJvdW5kKGR1cmF0aW9uSW5TZWNvbmRzIC8gKDM2MDAgKiAyNCAqIDM2NSkpKX0geWVhcnMgJHtzaWdufWA7XG4gICAgICBkZWZhdWx0OlxuICAgICAgICByZXR1cm4gJ0ludmFsaWQgZm9ybWF0JztcbiAgICB9XG4gIH1cbn1cbiJdfQ==
|
@@ -1215,10 +1215,9 @@ class AXTimeLeftFormatter {
|
|
1215
1215
|
return 'timeleft';
|
1216
1216
|
}
|
1217
1217
|
format(value, options) {
|
1218
|
-
const
|
1219
|
-
|
1220
|
-
|
1221
|
-
}
|
1218
|
+
const valueNumber = Number(value);
|
1219
|
+
const sign = valueNumber >= 0 ? 'left' : 'ago';
|
1220
|
+
const milliseconds = Math.abs(valueNumber);
|
1222
1221
|
const durationInSeconds = Math.round(milliseconds / 1000);
|
1223
1222
|
let format = options?.format;
|
1224
1223
|
// Determine the best format if format is null
|
@@ -1240,53 +1239,53 @@ class AXTimeLeftFormatter {
|
|
1240
1239
|
const pad = (num) => num.toString().padStart(2, '0');
|
1241
1240
|
switch (format) {
|
1242
1241
|
case 's':
|
1243
|
-
return `${durationInSeconds} seconds
|
1242
|
+
return `${durationInSeconds} seconds ${sign}`;
|
1244
1243
|
case 'ss':
|
1245
|
-
return `${pad(durationInSeconds)} seconds
|
1244
|
+
return `${pad(durationInSeconds)} seconds ${sign}`;
|
1246
1245
|
case 'm':
|
1247
|
-
return `${Math.round(durationInSeconds / 60)} minute${durationInSeconds >= 120 ? 's' : ''}
|
1246
|
+
return `${Math.round(durationInSeconds / 60)} minute${durationInSeconds >= 120 ? 's' : ''} ${sign}`;
|
1248
1247
|
case 'mm':
|
1249
|
-
return `${pad(Math.round(durationInSeconds / 60))} minutes
|
1248
|
+
return `${pad(Math.round(durationInSeconds / 60))} minutes ${sign}`;
|
1250
1249
|
case 'h':
|
1251
1250
|
case 'H':
|
1252
1251
|
if (durationInSeconds < 60 * 89)
|
1253
|
-
return
|
1254
|
-
return `${Math.round(durationInSeconds / 3600)} hour${durationInSeconds >= 60 * 180 ? 's' : ''}
|
1252
|
+
return `an hour ${sign}`;
|
1253
|
+
return `${Math.round(durationInSeconds / 3600)} hour${durationInSeconds >= 60 * 180 ? 's' : ''} ${sign}`;
|
1255
1254
|
case 'hh':
|
1256
1255
|
case 'HH':
|
1257
1256
|
if (durationInSeconds < 60 * 89)
|
1258
|
-
return
|
1259
|
-
return `${pad(Math.round(durationInSeconds / 3600))} hours
|
1257
|
+
return `01 hour ${sign}`;
|
1258
|
+
return `${pad(Math.round(durationInSeconds / 3600))} hours ${sign}`;
|
1260
1259
|
case 'd':
|
1261
1260
|
case 'D':
|
1262
1261
|
if (durationInSeconds < 60 * 60 * 35)
|
1263
|
-
return
|
1264
|
-
return `${Math.round(durationInSeconds / (3600 * 24))} day${durationInSeconds >= 60 * 60 * 70 ? 's' : ''}
|
1262
|
+
return `a day ${sign}`;
|
1263
|
+
return `${Math.round(durationInSeconds / (3600 * 24))} day${durationInSeconds >= 60 * 60 * 70 ? 's' : ''} ${sign}`;
|
1265
1264
|
case 'dd':
|
1266
1265
|
case 'DD':
|
1267
1266
|
if (durationInSeconds < 60 * 60 * 35)
|
1268
|
-
return
|
1269
|
-
return `${pad(Math.round(durationInSeconds / (3600 * 24)))} days
|
1267
|
+
return `01 day ${sign}`;
|
1268
|
+
return `${pad(Math.round(durationInSeconds / (3600 * 24)))} days ${sign}`;
|
1270
1269
|
case 'M':
|
1271
1270
|
if (durationInSeconds < 60 * 60 * 24 * 45)
|
1272
|
-
return
|
1273
|
-
return `${Math.round(durationInSeconds / (3600 * 24 * 30))} month${durationInSeconds >= 60 * 60 * 24 * 90 ? 's' : ''}
|
1271
|
+
return `a month ${sign}`;
|
1272
|
+
return `${Math.round(durationInSeconds / (3600 * 24 * 30))} month${durationInSeconds >= 60 * 60 * 24 * 90 ? 's' : ''} ${sign}`;
|
1274
1273
|
case 'MM':
|
1275
1274
|
if (durationInSeconds < 60 * 60 * 24 * 45)
|
1276
|
-
return
|
1277
|
-
return `${pad(Math.round(durationInSeconds / (3600 * 24 * 30)))} months
|
1275
|
+
return `01 month ${sign}`;
|
1276
|
+
return `${pad(Math.round(durationInSeconds / (3600 * 24 * 30)))} months ${sign}`;
|
1278
1277
|
case 'y':
|
1279
1278
|
case 'Y':
|
1280
1279
|
if (durationInSeconds < 60 * 60 * 24 * 547)
|
1281
|
-
return
|
1282
|
-
return `${Math.round(durationInSeconds / (3600 * 24 * 365))} year${durationInSeconds >= 60 * 60 * 24 * 730 ? 's' : ''}
|
1280
|
+
return `a year ${sign}`;
|
1281
|
+
return `${Math.round(durationInSeconds / (3600 * 24 * 365))} year${durationInSeconds >= 60 * 60 * 24 * 730 ? 's' : ''} ${sign}`;
|
1283
1282
|
case 'yy':
|
1284
1283
|
case 'YY':
|
1285
1284
|
case 'yyyy':
|
1286
1285
|
case 'YYYY':
|
1287
1286
|
if (durationInSeconds < 60 * 60 * 24 * 547)
|
1288
|
-
return
|
1289
|
-
return `${pad(Math.round(durationInSeconds / (3600 * 24 * 365)))} years
|
1287
|
+
return `01 year ${sign}`;
|
1288
|
+
return `${pad(Math.round(durationInSeconds / (3600 * 24 * 365)))} years ${sign}`;
|
1290
1289
|
default:
|
1291
1290
|
return 'Invalid format';
|
1292
1291
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-core-date-time.mjs","sources":["../../../../libs/core/date-time/src/lib/datetime.class.ts","../../../../libs/core/date-time/src/lib/georgian.calendar.ts","../../../../libs/core/date-time/src/lib/jalali.calendar.ts","../../../../libs/core/date-time/src/lib/dateTime.config.ts","../../../../libs/core/date-time/src/lib/holidays.loader.ts","../../../../libs/core/date-time/src/lib/calendar.service.ts","../../../../libs/core/date-time/src/lib/datetime.pipe.ts","../../../../libs/core/date-time/src/lib/formatters/datetime-formatter.ts","../../../../libs/core/date-time/src/lib/formatters/time-duration-formatter.ts","../../../../libs/core/date-time/src/lib/formatters/timeleft-formatter.ts","../../../../libs/core/date-time/src/lib/datetime.module.ts","../../../../libs/core/date-time/src/acorex-core-date-time.ts"],"sourcesContent":["import { isBrowser } from '@acorex/core/platform';\nimport { translateSync } from '@acorex/core/translation';\nimport { defaults, orderBy } from 'lodash-es';\n\nexport type TimeUnit = 'ms' | 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year' | 'week';\n\nexport interface AXDateValue {\n year: number;\n month: number;\n date: number;\n hours?: number;\n minutes?: number;\n seconds?: number;\n ms?: number;\n}\n\nexport interface AXDateTimeDisplayFormats {\n dateInput: string;\n timeInput: string;\n dateTimeInput: string;\n dateDisplay: string;\n timeDisplay: string;\n dateTimeDisplay: string;\n}\n\nexport type AXDateTimeUnitNames = {\n long: string;\n short: string;\n letter: string;\n}[];\n\nexport type AXDateTimePart = {\n key: string;\n placeholder: string;\n placeholders: string[];\n typedValue?: string | null;\n default: number;\n enabled: boolean;\n realValue: () => string;\n};\n\nexport type AXDateTimeParts = {\n year: AXDateTimePart;\n month: AXDateTimePart;\n day: AXDateTimePart;\n hour: AXDateTimePart;\n minute: AXDateTimePart;\n second: AXDateTimePart;\n};\n\nexport interface AXCalendarConfig {\n weekdays: number[];\n weekend: number[];\n formats: AXDateTimeDisplayFormats;\n}\n\nexport abstract class AXCalendar {\n private _config: AXCalendarConfig;\n\n /**\n * @ignore\n */\n constructor(config: AXCalendarConfig) {\n this._config = config;\n }\n\n public get weekend(): number[] {\n return this._config.weekend;\n }\n\n public get formats(): AXDateTimeDisplayFormats {\n return this._config.formats;\n }\n\n public get weekdays(): number[] {\n return this._config.weekdays;\n }\n\n abstract name(): string;\n\n abstract dayOfMonth(date: Date): number;\n\n abstract dayOfYear(date: Date): number;\n\n abstract dayOfWeek(date: Date): number;\n\n abstract monthOfYear(date: Date): number;\n\n abstract weekOfYear(date: Date): number;\n\n abstract year(date: Date): number;\n\n abstract add(date: Date, unit: TimeUnit, amount: number): AXDateTime;\n\n abstract set(date: Date, unit: TimeUnit, value: number): AXDateTime;\n\n abstract startOf(date: Date, unit: TimeUnit): AXDateTime;\n\n abstract endOf(date: Date, unit: TimeUnit): AXDateTime;\n\n abstract create(value: AXDateValue): AXDateTime;\n\n abstract parse(value: string): AXDateTime;\n}\n\nexport class AXDateTime {\n private _date: Date;\n\n get date(): Date {\n return this._date;\n }\n\n private _calendar: AXCalendar;\n get calendar(): AXCalendar {\n return this._calendar;\n }\n\n constructor(value: Date, calendar: AXCalendar) {\n this._calendar = calendar;\n this._date = value;\n }\n\n clone(): AXDateTime {\n return new AXDateTime(this.date, this.calendar);\n }\n\n get dayOfMonth(): number {\n return this._calendar.dayOfMonth(this.date);\n }\n\n get dayOfYear(): number {\n return this._calendar.dayOfYear(this.date);\n }\n\n get dayOfWeek(): number {\n return this._calendar.dayOfWeek(this.date);\n }\n\n get hour(): number {\n return this._date.getHours();\n }\n\n get minute(): number {\n return this._date.getMinutes();\n }\n\n get second(): number {\n return this._date.getSeconds();\n }\n\n get year(): number {\n return this._calendar.year(this.date);\n }\n\n get monthOfYear(): number {\n return this._calendar.monthOfYear(this.date);\n }\n\n get weekOfYear(): number {\n return this._calendar.weekOfYear(this.date);\n }\n\n get month(): AXCalendarMonth {\n return new AXCalendarMonth(this);\n }\n\n add(unit: TimeUnit, amount: number): AXDateTime {\n return this._calendar.add(this.date, unit, amount);\n }\n\n set(unit: TimeUnit = 'day', value: number): AXDateTime {\n return this._calendar.set(this.date, unit, value);\n }\n\n duration(end: Date | AXDateTime): AXTimeSpan {\n const date = end instanceof AXDateTime ? end.date : (end as Date);\n const val = new AXDateTime(date, this.calendar);\n const range = new AXDateTimeRange(this, val);\n return range.duration();\n }\n\n startOf(unit: TimeUnit = 'day'): AXDateTime {\n return this._calendar.startOf(this.date, unit);\n }\n\n endOf(unit: TimeUnit = 'day'): AXDateTime {\n return this._calendar.endOf(this.date, unit);\n }\n\n //TODO: remove unused items\n private _formatKeys = {\n ss: () => this.pad(this.date.getSeconds(), 2),\n s: () => this.date.getSeconds().toString(),\n //\n dd: () => this.pad(this.calendar.dayOfMonth(this.date), 2),\n DD: () => this.pad(this.calendar.dayOfMonth(this.date), 2),\n d: () => this.calendar.dayOfMonth(this.date).toString(),\n //\n mm: () => this.pad(this.date.getMinutes(), 2),\n m: () => this.date.getMinutes().toString(),\n //\n MMMM: () => translateSync(`dateTime.months.${this.calendar.name()}.long.${this.calendar.monthOfYear(this.date) - 1}`),\n MMM: () => translateSync(`dateTime.months.${this.calendar.name()}.short.${this.calendar.monthOfYear(this.date) - 1}`),\n MM: () => this.pad(this.calendar.monthOfYear(this.date), 2),\n M: () => this.calendar.monthOfYear(this.date),\n //\n E: () => translateSync(`dateTime.weekdays.long.${this.calendar.weekdays[this.calendar.dayOfWeek(this.date) - 1]}`),\n DDD: () => translateSync(`dateTime.weekdays.short.${this.calendar.weekdays[this.calendar.dayOfWeek(this.date) - 1]}`),\n DDDD: () => this._formatKeys['E'](),\n //\n yyyy: () => this.pad(this.calendar.year(this.date), 4),\n YYYY: () => this.pad(this.calendar.year(this.date), 4),\n yy: () => this.pad(this.calendar.year(this.date), 4).substring(2),\n YY: () => this.pad(this.calendar.year(this.date), 4).substring(2),\n //\n HH: () => this.pad(this.date.getHours(), 2),\n H: () => this.date.getHours().toString(),\n //\n hh: () => this.pad(this.date.getHours() % 12 || 12, 2),\n h: () => (this.date.getHours() % 12 || 12).toString(),\n //\n A: () => (this.date.getHours() < 12 ? 'am' : 'pm'),\n a: () => (this.date.getHours() < 12 ? 'am' : 'pm'),\n date: (options) => this.format(this.getDateTimeFormatByLocale(options.locale, 'shortDate')),\n shortDate: (options) => this.format(this.getDateTimeFormatByLocale(options.locale, 'shortDate')),\n longDate: (options) => this.format(this.getDateTimeFormatByLocale(options.locale, 'longDate')),\n //\n shortTime: (options) => this.format(this.getDateTimeFormatByLocale(options.locale, 'shortTime')),\n time: (options) => this.format(this.getDateTimeFormatByLocale(options.locale, 'shortTime')),\n longTime: (options) => this.format(this.getDateTimeFormatByLocale(options.locale, 'longTime')),\n //\n datetime: (options) => this.format('date time', { locale: options.locale }),\n };\n\n protected _language = () => (isBrowser() ? navigator.language : 'en-GB');\n\n format(format: string = this.getDateTimeFormatByLocale(this._language(), 'shortDate'), options?: { locale?: string }): string {\n const effectiveOptions = defaults({}, options, {\n locale: this._language(),\n });\n const re = new RegExp(orderBy(Object.keys(this._formatKeys), (c) => c.length, ['desc']).join('|'), 'gi');\n return format.replace(re, (matched) => {\n const f = this._formatKeys[matched];\n const r = f(effectiveOptions);\n return r;\n });\n }\n\n getDateTimeFormatByLocale(locale: string, style: 'shortDate' | 'longDate' | 'shortTime' | 'longTime'): string {\n let options: Intl.DateTimeFormatOptions = {};\n switch (style) {\n case 'shortDate': // Year, Month, Day\n options = { year: 'numeric', month: '2-digit', day: '2-digit' };\n break;\n case 'longDate': // Weekday, Month name, Day, Year\n options = {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n };\n break;\n case 'shortTime': // Hour, Minute\n options = { hour: '2-digit', minute: '2-digit', hour12: false };\n break;\n case 'longTime': // Hour, Minute, Second\n options = {\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false,\n };\n break;\n }\n\n const formatter = new Intl.DateTimeFormat(locale, options);\n\n // Get parts of the date and/or time\n const parts = formatter.formatToParts(new Date());\n\n // Map parts to their respective format\n const formatMap: { [key: string]: string } = {\n day: 'dd',\n month: style == 'longDate' ? 'MMMM' : 'MM',\n year: 'yyyy',\n hour: 'HH',\n minute: 'mm',\n second: 'ss',\n weekday: 'E',\n literal: '',\n };\n\n // Construct the date and/or time format string\n return parts\n .map((part) => {\n if (part.type === 'literal') {\n // Use the literal part directly as separator\n return part.value;\n } else {\n return formatMap[part.type] || part.value;\n }\n })\n .join('');\n }\n\n private pad(n, width, z = '0') {\n n = n + '';\n return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;\n }\n\n equal(value: Date | AXDateTime, unit: TimeUnit = 'day') {\n return this.compare(value, unit) == 0;\n }\n\n compare(value: Date | AXDateTime, unit: TimeUnit = 'day') {\n const date = value instanceof AXDateTime ? value.date : (value as Date);\n const val = new AXDateTime(date, this.calendar);\n const func = (v1: number, v2: number) => {\n if (v1 == v2) {\n return 0;\n } else if (v1 > v2) {\n return 1;\n } else {\n return -1;\n }\n };\n let p = 0;\n switch (unit) {\n case 'year':\n return func(this.year, val.year);\n case 'week':\n p = this.compare(val, 'year');\n return p == 0 ? func(this.weekOfYear, val.weekOfYear) : p;\n case 'month':\n p = this.compare(val, 'year');\n return p == 0 ? func(this.monthOfYear, val.monthOfYear) : p;\n case 'day':\n p = this.compare(val, 'year');\n return p == 0 ? func(this.dayOfYear, val.dayOfYear) : p;\n case 'hour':\n p = this.compare(val, 'day');\n return p == 0 ? func(this.hour, val.hour) : p;\n case 'minute':\n p = this.compare(val, 'hour');\n return p == 0 ? func(this.minute, val.minute) : p;\n case 'second':\n p = this.compare(val, 'minute');\n return p == 0 ? func(this.second, val.second) : p;\n default:\n return func(this.date.getTime(), val.date.getTime());\n }\n }\n}\n\nexport class AXCalendarMonth {\n private _range: AXDateTimeRange;\n public get range(): AXDateTimeRange {\n return this._range;\n }\n public set range(v: AXDateTimeRange) {\n this._range = v;\n }\n\n public get totalDays(): number {\n return this.range.endTime.dayOfMonth;\n }\n\n constructor(date: AXDateTime) {\n this.index = date.date.getMonth();\n this.name = date.format('MMMM');\n this.range = new AXDateTimeRange(\n new AXDateTime(date.startOf('month').date, date.calendar),\n new AXDateTime(date.endOf('month').date, date.calendar),\n );\n }\n\n private readonly index: number;\n private readonly name: string;\n}\n\nexport interface AXTimeSpanTotal {\n miliseconds: number;\n seconds: number;\n minutes: number;\n hours: number;\n days: number;\n weeks: number;\n months: number;\n years: number;\n}\n\nexport interface AXTimeSpan {\n miliseconds: number;\n seconds: number;\n minutes: number;\n hours: number;\n days: number;\n months: number;\n years: number;\n total: AXTimeSpanTotal;\n}\n\nexport class AXDateTimeRange {\n private _startTime: AXDateTime;\n private _endTime: AXDateTime;\n\n public get startTime(): AXDateTime {\n return this._startTime;\n }\n\n public get endTime(): AXDateTime {\n return this._endTime;\n }\n\n constructor(startTime: AXDateTime, endTime: AXDateTime) {\n this._startTime = startTime;\n this._endTime = endTime;\n }\n\n duration(): AXTimeSpan {\n const result: AXTimeSpan = {\n miliseconds: 0,\n seconds: 0,\n minutes: 0,\n hours: 0,\n days: 0,\n months: 0,\n years: 0,\n total: {\n miliseconds: 0,\n seconds: 0,\n minutes: 0,\n hours: 0,\n days: 0,\n weeks: 0,\n months: 0,\n years: 0,\n },\n };\n\n const one_second = 1000;\n const one_min = one_second * 60;\n const one_hour = one_min * 60;\n const one_day = one_hour * 24;\n const one_week = one_day * 7;\n const one_year = 365.25 * one_day;\n const one_month = one_year / 12;\n const startTime = this._startTime.date.getTime();\n const endTime = this._endTime.date.getTime();\n const diff = Math.abs(endTime - startTime);\n //\n result.total.miliseconds = diff;\n result.total.seconds = Number((diff / one_second).toFixed(2));\n result.total.minutes = Number((diff / one_min).toFixed(2));\n result.total.hours = Number((diff / one_hour).toFixed(2));\n result.total.days = Number((diff / one_day).toFixed(2));\n result.total.weeks = Number((diff / one_week).toFixed(2));\n //\n // let months = (this.endTime.year - this.startTime.year) * 12;\n // months += this.endTime.monthOfYear - this.startTime.monthOfYear + 1;\n // if (this.endTime.dayOfYear < this.startTime.dayOfYear) {\n // months--;\n // }\n // result.total.months = Math.abs(months);\n // TODO: review\n result.total.months = Number((diff / one_month).toFixed(2));\n result.total.years = Number((diff / one_year).toFixed(2));\n //\n result.miliseconds = result.total.miliseconds % 1000;\n result.seconds = Number((result.total.seconds % 60).toFixed(0));\n result.minutes = Number((result.total.minutes % 60).toFixed(0));\n result.hours = Number((result.total.hours % 24).toFixed(0));\n // TODO: review\n result.days = Number((result.total.days % 30.4).toFixed(0));\n result.months = Number((result.total.months % 12).toFixed(0));\n result.years = Number(result.total.years.toFixed(0));\n return result;\n }\n\n enumurate(unit: TimeUnit = 'day', amount = 1): AXDateTime[] {\n const result: AXDateTime[] = [];\n let item = this._startTime.clone();\n while (item.compare(this._endTime, unit) < 1) {\n if (!result.some((c) => c.equal(item, unit))) {\n result.push(item);\n }\n item = item.add(unit, amount);\n }\n return result;\n }\n}\n","import { AXCalendar, AXCalendarConfig, AXDateTime, AXDateValue, TimeUnit } from './datetime.class';\n\nexport class GeorgianCalendar extends AXCalendar {\n /**\n * @ignore\n */\n constructor(config: AXCalendarConfig) {\n super(config);\n }\n\n create(value: AXDateValue): AXDateTime {\n return new AXDateTime(\n new Date(value.year, value.month - 1, value.date, value.hours || 0, value.minutes || 0, value.seconds || 0, value.ms || 0),\n this,\n );\n }\n\n name(): string {\n return 'georgian';\n }\n\n dayOfMonth(date: Date): number {\n return date.getDate();\n }\n\n dayOfYear(date: Date): number {\n let result = 0;\n let m = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n if (this.isLeap(date)) {\n m[1] = 29;\n }\n for (let i = 0; i < date.getMonth(); i++) {\n result = result + m[i];\n }\n result += date.getDate();\n return result;\n }\n\n dayOfWeek(date: Date): number {\n return date.getDay() + 1;\n }\n\n weekOfYear(date: Date): number {\n const firstDay = new AXDateTime(date, this).startOf('year');\n return Math.ceil(((date.getTime() - firstDay.date.getTime()) / 86400000 + firstDay.date.getDay() + 1) / 7);\n }\n\n year(date: Date): number {\n return date.getFullYear();\n }\n\n monthOfYear(date: Date): number {\n return date.getMonth() + 1;\n }\n\n add(date: Date, unit: TimeUnit, amount: number): AXDateTime {\n let value = date.valueOf();\n switch (unit) {\n case 'second':\n value += 1000 * amount;\n break;\n case 'minute':\n value += 60000 * amount;\n break;\n case 'hour':\n value += 3600000 * amount;\n break;\n case 'month': {\n const v = new Date(value);\n\n // Calculate the new year and month considering the amount\n let newYear = v.getFullYear();\n let newMonth = v.getMonth() + amount;\n\n // Adjust for year overflow or underflow\n while (newMonth > 11) {\n newMonth -= 12;\n newYear++;\n }\n while (newMonth < 0) {\n newMonth += 12;\n newYear--;\n }\n\n // Set the date to the first of the month to prevent overflow\n v.setDate(1);\n v.setFullYear(newYear);\n v.setMonth(newMonth);\n\n // Get the last day of the new month\n const lastDayOfMonth = new Date(newYear, newMonth + 1, 0).getDate();\n\n // Set the date to either the original day or the last day of the new month, whichever is smaller\n const originalDay = date.getDate();\n v.setDate(Math.min(originalDay, lastDayOfMonth));\n\n value = v.valueOf();\n break;\n }\n case 'week':\n value += 7 * 86400000 * amount;\n break;\n case 'year': {\n const newDate = new Date(value);\n newDate.setFullYear(newDate.getFullYear() + amount);\n // Handling for leap years: if the original date is February 29th, and the new year is not a leap year,\n // set the date to February 28th.\n if (date.getMonth() === 1 && date.getDate() === 29 && newDate.getMonth() !== 1) {\n newDate.setMonth(1);\n newDate.setDate(28);\n }\n value = newDate.valueOf();\n break;\n }\n case 'day':\n default:\n value += 86400000 * amount;\n }\n return new AXDateTime(new Date(value), this);\n }\n\n set(date: Date, unit: TimeUnit, value: number): AXDateTime {\n const clone = new Date(date.valueOf());\n switch (unit) {\n case 'second':\n clone.setHours(clone.getHours(), clone.getMinutes(), value, clone.getMilliseconds());\n break;\n case 'minute':\n clone.setHours(clone.getHours(), value, clone.getSeconds(), clone.getMilliseconds());\n break;\n case 'hour':\n clone.setHours(value, clone.getMinutes(), clone.getSeconds(), clone.getMilliseconds());\n break;\n default:\n case 'day':\n clone.setDate(value);\n break;\n case 'week':\n break;\n case 'month':\n clone.setMonth(Math.max(0, value - 1));\n break;\n case 'year':\n clone.setFullYear(value);\n break;\n }\n return new AXDateTime(clone, this);\n }\n\n startOf(date: Date, unit: TimeUnit): AXDateTime {\n const clone = new Date(date.valueOf());\n switch (unit) {\n case 'second':\n clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 0);\n return new AXDateTime(clone, this);\n case 'minute':\n clone.setHours(clone.getHours(), clone.getMinutes(), 0, 0);\n return new AXDateTime(clone, this);\n case 'hour':\n clone.setHours(clone.getHours(), 0, 0, 0);\n return new AXDateTime(clone, this);\n default:\n case 'day':\n clone.setHours(0, 0, 0, 0);\n return new AXDateTime(clone, this);\n case 'week': {\n const start = 1; // Week starts on Monday\n const day = clone.getDay();\n const diff = clone.getDate() - day + (day == 0 ? -6 : start - day);\n clone.setDate(diff);\n clone.setHours(0, 0, 0, 0);\n return new AXDateTime(clone, this);\n }\n case 'month':\n clone.setDate(1);\n return new AXDateTime(clone, this).startOf('day');\n case 'year':\n clone.setMonth(0);\n clone.setDate(1);\n return new AXDateTime(clone, this).startOf('day');\n }\n }\n\n endOf(date: Date, unit: TimeUnit): AXDateTime {\n const clone = new Date(date.valueOf());\n switch (unit) {\n case 'second':\n clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 999);\n return new AXDateTime(clone, this);\n case 'minute':\n clone.setHours(clone.getHours(), clone.getMinutes(), 59, 999);\n return new AXDateTime(clone, this);\n case 'hour':\n clone.setHours(clone.getHours(), 59, 59, 999);\n return new AXDateTime(clone, this);\n default:\n case 'day':\n clone.setHours(23, 59, 59, 999);\n return new AXDateTime(clone, this);\n case 'week':\n return this.startOf(date, 'week').add('day', 6).endOf('day');\n case 'month': {\n const dateObj = new Date(date.getFullYear(), date.getMonth() + 1, 0);\n dateObj.setHours(23, 59, 59, 999);\n return new AXDateTime(dateObj, this);\n }\n case 'year':\n clone.setMonth(11);\n return new AXDateTime(clone, this).endOf('month');\n }\n }\n\n isLeap(date: Date) {\n let leapYear = new Date(date.getFullYear(), 1, 29);\n return leapYear.getDate() == 29;\n }\n\n parse(value: string): AXDateTime {\n return new AXDateTime(new Date(value), this);\n }\n}\n","import { AXCalendar, AXCalendarConfig, AXDateTime, AXDateValue, TimeUnit } from './datetime.class';\n\nexport class JalaliCalendar extends AXCalendar {\n /**\n * @ignore\n */\n constructor(config: AXCalendarConfig) {\n super(config);\n }\n\n /*\n Jalaali years starting the 33-year rule.\n*/\n private breaks = [-61, 9, 38, 199, 426, 686, 756, 818, 1111, 1181, 1210, 1635, 2060, 2097, 2192, 2262, 2324, 2394, 2456, 3178];\n\n create(value: AXDateValue): AXDateTime {\n const a = this.toGregorian(value.year, value.month, value.date);\n return new AXDateTime(\n new Date(a.getFullYear(), a.getMonth(), a.getDate(), value.hours || 0, value.minutes || 0, value.seconds || 0, value.ms || 0),\n this,\n );\n }\n\n name(): string {\n return 'jalali';\n }\n\n dayOfMonth(date: Date): number {\n return this.toJalaali(date).day;\n }\n\n dayOfYear(date: Date): number {\n const j = this.toJalaali(date);\n return (j.month <= 6 ? (j.month - 1) * 31 : 6 * 31 + (j.month - 7) * 30) + j.day;\n }\n\n dayOfWeek(date: Date): number {\n return date.getDay() == 6 ? 1 : date.getDay() + 2;\n }\n\n weekOfYear(date: Date): number {\n //TODO : apply jalali\n const firstDay = new AXDateTime(date, this).startOf('year');\n return Math.ceil(((date.getTime() - firstDay.date.getTime()) / 86400000 + firstDay.date.getDay() + 1) / 7);\n }\n\n year(date: Date): number {\n return this.toJalaali(date).year;\n }\n\n monthOfYear(date: Date): number {\n return this.toJalaali(date).month;\n }\n\n add(date: Date, unit: TimeUnit, amount: number): AXDateTime {\n let value = date.valueOf();\n switch (unit) {\n case 'second':\n value += 1000 * amount;\n break;\n case 'minute':\n value += 60000 * amount;\n break;\n case 'hour':\n value += 3600000 * amount;\n break;\n case 'month': {\n // const v = new Date(value);\n // let jd = this.dayOfMonth(date);\n // let jm = this.monthOfYear(date);\n // let jy = this.year(date);\n // const nm = jm + amount;\n // const ny = nm % 12 ? Math.floor(nm / 12) : 0;\n // jy += ny;\n // jm = nm - ny * 12;\n // const vv = this.toGregorian(jy, jm, jd);\n // v.setFullYear(vv.getFullYear());\n // v.setMonth(vv.getMonth());\n // v.setDate(vv.getDate());\n // value = v.valueOf();\n // break;\n let jd = this.dayOfMonth(date);\n let jm = this.monthOfYear(date);\n let jy = this.year(date);\n\n let newMonth = jm + amount;\n let yearsToAdd = Math.floor(newMonth / 12);\n newMonth = newMonth % 12;\n if (newMonth <= 0) {\n newMonth += 12;\n yearsToAdd--;\n }\n\n jy += yearsToAdd;\n\n // Temporary set to first of the month to prevent rollover\n const tempDate = this.toGregorian(jy, newMonth, 1);\n const gregorianDate = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate());\n\n // Adjust the day to either the original day or the last day of the new month, whichever is smaller\n const lastDayOfNewMonth = this.jalaaliMonthLength(jy, newMonth); // Implement this method to find the last day in a Jalali month\n jd = Math.min(jd, lastDayOfNewMonth);\n\n const finalDate = this.toGregorian(jy, newMonth, jd);\n gregorianDate.setFullYear(finalDate.getFullYear());\n gregorianDate.setMonth(finalDate.getMonth());\n gregorianDate.setDate(finalDate.getDate());\n\n value = gregorianDate.valueOf();\n break;\n }\n case 'week':\n value += 7 * 86400000 * amount;\n break;\n case 'year': {\n const v = new Date(value);\n let jd = this.dayOfMonth(date);\n let jm = this.monthOfYear(date);\n let jy = this.year(date);\n const vv = this.toGregorian(jy + amount, jm, jd);\n v.setFullYear(vv.getFullYear());\n v.setMonth(vv.getMonth());\n v.setDate(vv.getDate());\n value = v.valueOf();\n break;\n }\n case 'day':\n default:\n value += 86400000 * amount;\n }\n return new AXDateTime(new Date(value), this);\n }\n\n set(date: Date, unit: TimeUnit, value: number): AXDateTime {\n const clone = new Date(date.valueOf());\n const jDate = this.toJalaali(clone);\n switch (unit) {\n case 'second':\n clone.setHours(clone.getHours(), clone.getMinutes(), value, clone.getMilliseconds());\n break;\n case 'minute':\n clone.setHours(clone.getHours(), value, clone.getSeconds(), clone.getMilliseconds());\n break;\n case 'hour':\n clone.setHours(value, clone.getMinutes(), clone.getSeconds(), clone.getMilliseconds());\n break;\n default:\n case 'day': {\n const gDate = this.toGregorian(jDate.year, jDate.month, value);\n clone.setDate(gDate.getDate());\n break;\n }\n case 'week':\n break;\n case 'month': {\n const gDate2 = this.toGregorian(jDate.year, value, jDate.day);\n clone.setMonth(gDate2.getMonth());\n break;\n }\n case 'year': {\n const gDate3 = this.toGregorian(value, jDate.month, jDate.day);\n clone.setFullYear(gDate3.getFullYear());\n break;\n }\n }\n return new AXDateTime(clone, this);\n }\n\n startOf(date: Date, unit: TimeUnit): AXDateTime {\n const clone = new Date(date.valueOf());\n switch (unit) {\n case 'second':\n clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 0);\n return new AXDateTime(clone, this);\n case 'minute':\n clone.setHours(clone.getHours(), clone.getMinutes(), 0, 0);\n return new AXDateTime(clone, this);\n case 'hour':\n clone.setHours(clone.getHours(), 0, 0, 0);\n return new AXDateTime(clone, this);\n default:\n case 'day':\n clone.setHours(0, 0, 0, 0);\n return new AXDateTime(clone, this);\n case 'week':\n return new AXDateTime(clone, this).add('day', -this.dayOfWeek(clone) + 1).startOf('day');\n case 'month': {\n const jy = this.year(date);\n const jm = this.monthOfYear(date);\n const gDate = this.toGregorian(jy, jm, 1);\n return new AXDateTime(gDate, this).startOf('day');\n }\n case 'year': {\n const jy = this.year(date);\n const gDate = this.toGregorian(jy, 1, 1);\n return new AXDateTime(gDate, this).startOf('day');\n }\n }\n }\n\n endOf(date: Date, unit: TimeUnit): AXDateTime {\n const clone = new Date(date.valueOf());\n switch (unit) {\n case 'second':\n clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 999);\n return new AXDateTime(clone, this);\n case 'minute':\n clone.setHours(clone.getHours(), clone.getMinutes(), 59, 999);\n return new AXDateTime(clone, this);\n case 'hour':\n clone.setHours(clone.getHours(), 59, 59, 999);\n return new AXDateTime(clone, this);\n default:\n case 'day':\n clone.setHours(23, 59, 59, 999);\n return new AXDateTime(clone, this);\n case 'week': {\n return this.startOf(date, 'week').add('day', 6).endOf('day');\n }\n case 'month': {\n const jy = this.year(date);\n const jm = this.monthOfYear(date);\n const jd = this.jalaaliMonthLength(jy, jm);\n const gDate = this.toGregorian(jy, jm, jd);\n return new AXDateTime(gDate, this).endOf('day');\n }\n case 'year': {\n const jy = this.year(date);\n const gDate = this.toGregorian(jy, 12, this.jalaaliMonthLength(jy, 12));\n return new AXDateTime(gDate, this).endOf('day');\n }\n }\n }\n\n parse(value: string): AXDateTime {\n const [y, M, d, h, m, s, ms] = value.split(/[^a-zA-Z0-9]+/gi);\n const date = this.toGregorian(Number(y) ?? 0, Number(M) ?? 1, Number(d) ?? 1);\n if (h != null) date.setHours(Number(h));\n if (m != null) date.setMinutes(Number(m));\n if (s != null) date.setSeconds(Number(s));\n if (ms != null) date.setMilliseconds(Number(d));\n return new AXDateTime(date, this);\n }\n\n /*\n Converts a Gregorian date to Jalaali.\n*/\n toJalaali(date: Date): { year: number; month: number; day: number } {\n const gd = date.getDate();\n const gm = date.getMonth() + 1;\n const gy = date.getFullYear();\n const r = this.d2j(this.g2d(gy, gm, gd));\n return {\n year: r.jy,\n month: r.jm,\n day: r.jd,\n };\n }\n\n /*\n Converts a Jalaali date to Gregorian.\n */\n toGregorian(jy, jm, jd): Date {\n const g = this.d2g(this.j2d(jy, jm, jd));\n return new Date(g.gy, g.gm - 1, g.gd);\n }\n\n /*\n Checks whether a Jalaali date is valid or not.\n */\n isValidJalaaliDate(jy, jm, jd) {\n return jy >= -61 && jy <= 3177 && jm >= 1 && jm <= 12 && jd >= 1 && jd <= this.jalaaliMonthLength(jy, jm);\n }\n\n /*\n Is this a leap year or not?\n */\n isLeapJalaaliYear(jy) {\n return this.jalCalLeap(jy) === 0;\n }\n\n /*\n Number of days in a given month in a Jalaali year.\n */\n jalaaliMonthLength(jy, jm) {\n if (jm <= 6) return 31;\n if (jm <= 11) return 30;\n if (this.isLeapJalaaliYear(jy)) return 30;\n return 29;\n }\n\n /*\n This determines if the Jalaali (Persian) year is\n leap (366-day long) or is the common year (365 days)\n \n @param jy Jalaali calendar year (-61 to 3177)\n @returns number of years since the last leap year (0 to 4)\n */\n private jalCalLeap(jy: number) {\n let bl = this.breaks.length,\n jp = this.breaks[0],\n jm,\n jump,\n leap,\n n,\n i;\n\n if (jy < jp || jy >= this.breaks[bl - 1]) throw new Error('Invalid Jalaali year ' + jy);\n\n for (i = 1; i < bl; i += 1) {\n jm = this.breaks[i];\n jump = jm - jp;\n if (jy < jm) break;\n jp = jm;\n }\n n = jy - jp;\n\n if (jump - n < 6) n = n - jump + this.div(jump + 4, 33) * 33;\n leap = this.mod(this.mod(n + 1, 33) - 1, 4);\n if (leap === -1) {\n leap = 4;\n }\n\n return leap;\n }\n\n private jalCal(jy: number, withoutLeap: boolean) {\n let bl = this.breaks.length,\n gy = jy + 621,\n leapJ = -14,\n jp = this.breaks[0],\n jm,\n jump,\n leap,\n leapG,\n march,\n n,\n i;\n\n if (jy < jp || jy >= this.breaks[bl - 1]) throw new Error('Invalid Jalaali year ' + jy);\n\n // Find the limiting years for the Jalaali year jy.\n for (i = 1; i < bl; i += 1) {\n jm = this.breaks[i];\n jump = jm - jp;\n if (jy < jm) break;\n leapJ = leapJ + this.div(jump, 33) * 8 + this.div(this.mod(jump, 33), 4);\n jp = jm;\n }\n n = jy - jp;\n\n // Find the number of leap years from AD 621 to the beginning\n // of the current Jalaali year in the Persian calendar.\n leapJ = leapJ + this.div(n, 33) * 8 + this.div(this.mod(n, 33) + 3, 4);\n if (this.mod(jump, 33) === 4 && jump - n === 4) leapJ += 1;\n\n // And the same in the Gregorian calendar (until the year gy).\n leapG = this.div(gy, 4) - this.div((this.div(gy, 100) + 1) * 3, 4) - 150;\n\n // Determine the Gregorian date of Farvardin the 1st.\n march = 20 + leapJ - leapG;\n\n // return with gy and march when we don't need leap\n if (withoutLeap) return { gy: gy, march: march };\n\n // Find how many years have passed since the last leap year.\n if (jump - n < 6) n = n - jump + this.div(jump + 4, 33) * 33;\n leap = this.mod(this.mod(n + 1, 33) - 1, 4);\n if (leap === -1) {\n leap = 4;\n }\n\n return {\n leap: leap,\n gy: gy,\n march: march,\n };\n }\n\n private j2d(jy, jm, jd): number {\n let r = this.jalCal(jy, true);\n return this.g2d(r.gy, 3, r.march) + (jm - 1) * 31 - this.div(jm, 7) * (jm - 7) + jd - 1;\n }\n\n private d2j(jdn: number) {\n let gy = this.d2g(jdn).gy, // Calculate Gregorian year (gy).\n jy = gy - 621,\n r = this.jalCal(jy, false),\n jdn1f = this.g2d(gy, 3, r.march),\n jd,\n jm,\n k;\n\n // Find number of days that passed since 1 Farvardin.\n k = jdn - jdn1f;\n if (k >= 0) {\n if (k <= 185) {\n // The first 6 months.\n jm = 1 + this.div(k, 31);\n jd = this.mod(k, 31) + 1;\n return {\n jy: jy,\n jm: jm,\n jd: jd,\n };\n } else {\n // The remaining months.\n k -= 186;\n }\n } else {\n // Previous Jalaali year.\n jy -= 1;\n k += 179;\n if (r.leap === 1) k += 1;\n }\n jm = 7 + this.div(k, 30);\n jd = this.mod(k, 30) + 1;\n return {\n jy: jy,\n jm: jm,\n jd: jd,\n };\n }\n\n private g2d(gy: number, gm: number, gd: number): number {\n let d = this.div((gy + this.div(gm - 8, 6) + 100100) * 1461, 4) + this.div(153 * this.mod(gm + 9, 12) + 2, 5) + gd - 34840408;\n d = d - this.div(this.div(gy + 100100 + this.div(gm - 8, 6), 100) * 3, 4) + 752;\n return d;\n }\n\n private d2g(jdn: number) {\n let j, i, gd, gm, gy;\n j = 4 * jdn + 139361631;\n j = j + this.div(this.div(4 * jdn + 183187720, 146097) * 3, 4) * 4 - 3908;\n i = this.div(this.mod(j, 1461), 4) * 5 + 308;\n gd = this.div(this.mod(i, 153), 5) + 1;\n gm = this.mod(this.div(i, 153), 12) + 1;\n gy = this.div(j, 1461) - 100100 + this.div(8 - gm, 6);\n return {\n gy: gy,\n gm: gm,\n gd: gd,\n };\n }\n\n private jalaaliWeek(jy: number, jm: number, jd: number): { saturday: any; friday: any } {\n let dayOfWeek = this.jalaaliToDateObject(jy, jm, jd, 0, 0, 0, 0).getDay();\n\n let startDayDifference = dayOfWeek == 6 ? 0 : -(dayOfWeek + 1);\n let endDayDifference = 6 + startDayDifference;\n\n return {\n saturday: this.d2j(this.j2d(jy, jm, jd + startDayDifference)),\n friday: this.d2j(this.j2d(jy, jm, jd + endDayDifference)),\n };\n }\n\n private jalaaliToDateObject(jy: number, jm: number, jd: number, h: number = 0, m: number = 0, s: number = 0, ms: number = 0) {\n let gregorianCalenderDate = this.toGregorian(jy, jm, jd);\n\n return new Date(\n gregorianCalenderDate.getFullYear(),\n gregorianCalenderDate.getMonth() - 1,\n gregorianCalenderDate.getDate(),\n h || 0,\n m || 0,\n s || 0,\n ms || 0,\n );\n }\n\n /*\n Utility helper functions.\n */\n\n private div(a: number, b: number) {\n return ~~(a / b);\n }\n\n private mod(a: number, b: number) {\n return a - ~~(a / b) * b;\n }\n}\n","import { AX_GLOBAL_CONFIG } from '@acorex/core/config';\nimport { InjectionToken, inject } from '@angular/core';\nimport { set } from 'lodash-es';\nimport { AXCalendar } from './datetime.class';\nimport { GeorgianCalendar } from './georgian.calendar';\nimport { JalaliCalendar } from './jalali.calendar';\n\nexport interface AXDateTimeConfig {\n calendar: string;\n calendars: {\n [key: string]: AXCalendar;\n };\n}\n\nexport const AX_DATETIME_CONFIG = new InjectionToken<AXDateTimeConfig>('AX_DATETIME_CONFIG', {\n providedIn: 'root',\n factory: () => {\n const global = inject(AX_GLOBAL_CONFIG);\n set(global, 'dateTime', AX_DATETIME_CONFIG);\n return AXDateTimeDefaultConfig;\n },\n});\n\nexport const AXDateTimeDefaultConfig: AXDateTimeConfig = {\n calendar: 'georgian',\n calendars: {\n georgian: new GeorgianCalendar({\n weekdays: [0, 1, 2, 3, 4, 5, 6],\n weekend: [5, 6],\n formats: {\n dateInput: 'yyyy/MM/dd',\n timeInput: 'HH:mm',\n dateTimeInput: 'yyyy/MM/dd HH:mm',\n dateDisplay: 'DDDD, d MMM yyyy',\n timeDisplay: 'HH:mm',\n dateTimeDisplay: 'DDDD, d MMM yyyy HH:mm',\n },\n }),\n jalali: new JalaliCalendar({\n weekdays: [6, 0, 1, 2, 3, 4, 5],\n weekend: [6],\n formats: {\n dateInput: 'yyyy/MM/dd',\n timeInput: 'HH:mm',\n dateTimeInput: 'yyyy/MM/dd HH:mm',\n dateDisplay: 'DDDD, d MMM yyyy',\n timeDisplay: 'HH:mm',\n dateTimeDisplay: 'DDDD, d MMM yyyy HH:mm',\n },\n }),\n },\n};\n\nexport type PartialDateTimeConfig = Partial<AXDateTimeConfig>;\n\nexport function dateTimeConfig(config: PartialDateTimeConfig = {}): AXDateTimeConfig {\n const result = {\n ...AXDateTimeDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface AXHolidayDate {\n date: Date;\n title: string;\n description?: string;\n [key: string]: unknown;\n}\n\nexport interface AXHolidaysLoaderOptions {\n calendar?: string;\n range?: { start: Date; end: Date };\n}\n\nexport interface AXHolidaysLoader {\n getHolidays(options?: AXHolidaysLoaderOptions): Promise<AXHolidayDate[]>;\n}\n\nexport class AXHolidaysLoaderDefault implements AXHolidaysLoader {\n getHolidays(options?: AXHolidaysLoaderOptions | undefined): Promise<AXHolidayDate[]> {\n return Promise.resolve([]);\n }\n}\n\nexport const AX_DATETIME_HOLIDAYS_LOADER = new InjectionToken<AXHolidaysLoader>('AX_DATETIME_HOLIDAYS_LOADER', {\n providedIn: 'root',\n factory: () => {\n return new AXHolidaysLoaderDefault();\n },\n});\n","import { AXEventService, AXEventTypes } from '@acorex/core/events';\nimport { Injectable, inject } from '@angular/core';\nimport { BehaviorSubject, Subject } from 'rxjs';\nimport { AXDateTimeConfig, AX_DATETIME_CONFIG } from './dateTime.config';\nimport { AXCalendar, AXDateTime, AXDateValue } from './datetime.class';\nimport { AXHolidayDate, AXHolidaysLoaderOptions, AX_DATETIME_HOLIDAYS_LOADER } from './holidays.loader';\n\n@Injectable({ providedIn: 'root' })\nexport class AXCalendarService {\n private config: AXDateTimeConfig = inject(AX_DATETIME_CONFIG);\n private _holidaysLoader = inject(AX_DATETIME_HOLIDAYS_LOADER);\n private eventService = inject(AXEventService);\n\n public get calendar(): AXCalendar {\n return this.getActiveCalendar();\n }\n\n private activeCalendar = new BehaviorSubject<AXCalendar>(this.getDefaultCalendar());\n calendarChanges$ = this.activeCalendar.asObservable();\n\n public getDefaultCalendar(): AXCalendar {\n return this.config.calendars[this.config.calendar];\n }\n\n public getActiveCalendar(): AXCalendar {\n return this.activeCalendar.getValue();\n }\n\n public setActiveCalendar(name: string): void {\n if (name != this.calendar.name()) {\n const calendar = this.resolveCalendar(name);\n this.activeCalendar.next(calendar);\n this.eventService.emitEvent({\n type: AXEventTypes.AXCalendarChanged,\n payload: this.getActiveCalendar(),\n });\n }\n }\n\n public onHolidaysChanged: Subject<AXHolidayDate[]> = new Subject<AXHolidayDate[]>();\n private _holidays: AXHolidayDate[] = [];\n public get holidays(): AXHolidayDate[] {\n return this._holidays;\n }\n\n constructor() {\n this.loadHolidays();\n }\n\n public loadHolidays(options?: AXHolidaysLoaderOptions) {\n return this._holidaysLoader.getHolidays(options).then((value) => {\n this._holidays = value;\n this.onHolidaysChanged.next(this._holidays);\n });\n }\n\n public create(value: AXDateValue, calendarName?: string): AXDateTime;\n public create(value: Date, calendarName?: string): AXDateTime;\n public create(value: AXDateValue | Date, calendarName?: string): AXDateTime {\n const calendar = calendarName ? this.resolveCalendar(calendarName) : this.calendar;\n if (value instanceof Date) {\n return new AXDateTime(value, calendar);\n } else if (value?.year && value?.month) {\n return calendar.create(value as AXDateValue);\n }\n return this.now();\n }\n\n public now(calendarName?: string): AXDateTime {\n const calendar = calendarName ? this.resolveCalendar(calendarName) : this.calendar;\n return new AXDateTime(new Date(), calendar);\n }\n\n public resolveCalendar(name: string): AXCalendar {\n const c = this.config.calendars[name];\n if (!c) {\n return this.calendar;\n }\n return c;\n }\n\n public convert(value: Date | AXDateTime | string, calendarName?: string): AXDateTime {\n const isISOString = (str) => {\n if (!/\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(.\\d{3}Z)?/.test(str)) return false;\n const d = new Date(str);\n return d instanceof Date && !isNaN(d.getTime()); // valid date\n };\n //\n const calendar = calendarName ? this.resolveCalendar(calendarName) : this.calendar;\n if (typeof value === 'string') {\n if (isISOString(value)) return new AXDateTime(new Date(value), calendar);\n else return calendar.parse(value);\n }\n const date = value instanceof AXDateTime ? value.date : (value as Date);\n return new AXDateTime(date, calendar);\n }\n}\n","import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { AXCalendarService } from './calendar.service';\nimport { AXDateTime } from './datetime.class';\n\n/**\n * @deprecated The pipe should not be used, use format instead\n */\n@Pipe({ name: 'axDate' })\nexport class AXDateTimePipe implements PipeTransform {\n private _calendarService: AXCalendarService = inject(AXCalendarService);\n\n transform(value: Date | AXDateTime | string, format?: string, calendarName?: string): string {\n if (value == null) {\n return '';\n }\n let calendar = this._calendarService.calendar;\n if (calendarName) {\n calendar = this._calendarService.resolveCalendar(calendarName);\n }\n const val: AXDateTime = this._calendarService.convert(value, calendar.name());\n return val.format(format);\n }\n}\n","import { AXFormatOptions, AXFormatter } from '@acorex/core/format';\nimport { Injectable, inject } from '@angular/core';\nimport { AXCalendarService } from '../calendar.service';\n\nexport interface AXDateTimeFormatterOptions extends AXFormatOptions {\n format?: string;\n calendar?: string;\n locale?: string;\n}\n\ndeclare module '@acorex/core/format' {\n interface AXFormatOptionsMap {\n datetime: AXDateTimeFormatterOptions;\n }\n}\n\n@Injectable()\nexport class AXDateTimeFormatter implements AXFormatter {\n private calendarService = inject(AXCalendarService);\n\n get name(): string {\n return 'datetime';\n }\n\n format(value: unknown, options?: AXDateTimeFormatterOptions | string): string {\n const effectiveOptions =\n typeof options == 'object'\n ? {\n format: options.format ?? 'date',\n locale: options.locale,\n calendar: options.calendar ?? this.calendarService.calendar.name(),\n }\n : {\n format: options,\n calendar: this.calendarService.calendar.name(),\n };\n\n const date:Date | null = (value instanceof Date ) ? value : \n (typeof value==\"number\" || typeof value==\"string\" ? new Date(value as any) : null) ;\n //\n if(!date)\n return \"\";\n //\n return this.calendarService\n .create(date, effectiveOptions.calendar as string)\n .format(effectiveOptions.format, { locale: effectiveOptions.locale });\n }\n}\n","import { AXFormatOptions, AXFormatter } from '@acorex/core/format';\nimport { Injectable } from '@angular/core';\n\nexport interface AXTimeDurationFormatterOptions extends AXFormatOptions {\n format: string;\n}\n\ndeclare module '@acorex/core/format' {\n interface AXFormatOptionsMap {\n duration: AXTimeDurationFormatterOptions;\n }\n}\n\n@Injectable()\nexport class AXTimeDurationFormatter implements AXFormatter {\n get name(): string {\n return 'time-duration';\n }\n\n format(value: number, options?: AXTimeDurationFormatterOptions): string {\n const milliseconds = Number(value);\n if (milliseconds === null || isNaN(milliseconds)) {\n return '...';\n }\n\n // Convert milliseconds to various units\n const totalMilliseconds = milliseconds % 1000;\n const totalSeconds = Math.floor(milliseconds / 1000);\n const seconds = totalSeconds % 60;\n const totalMinutes = Math.floor(totalSeconds / 60);\n const minutes = totalMinutes % 60;\n const totalHours = Math.floor(totalMinutes / 60);\n\n // Helper function for zero-padding\n const pad = (num: number, length = 2) => num.toString().padStart(length, '0');\n\n // Default format if none provided\n const format = options?.format || (totalHours >= 0 ? 'HH:mm:ss' : 'mm:ss');\n\n const formattedTime = [];\n\n // Parse format and build the time string accordingly\n if (format.includes('HH') || format.includes('H')) {\n formattedTime.push(pad(totalHours));\n }\n if (format.includes('mm')) {\n formattedTime.push(pad(minutes));\n } else if (format.includes('m')) {\n formattedTime.push(minutes.toString());\n }\n if (format.includes('ss')) {\n formattedTime.push(pad(seconds));\n } else if (format.includes('s')) {\n formattedTime.push(seconds.toString());\n }\n if (format.includes('ms') || format.includes('MS')) {\n formattedTime.push(pad(totalMilliseconds, 3));\n }\n\n // Join the parts according to the format\n return formattedTime.join(format.includes('ms') || format.includes('MS') ? ':' : ':');\n }\n}\n","import { AXFormatOptions, AXFormatter } from '@acorex/core/format';\nimport { Injectable } from '@angular/core';\nimport { isNil } from 'lodash-es';\n\nexport interface AXTimeLeftFormatterOptions extends AXFormatOptions {\n format: string;\n}\n\ndeclare module '@acorex/core/format' {\n interface AXFormatOptionsMap {\n timeleft: AXTimeLeftFormatterOptions;\n }\n}\n\n@Injectable()\nexport class AXTimeLeftFormatter implements AXFormatter {\n get name(): string {\n return 'timeleft';\n }\n\n format(value: number | string, options?: AXTimeLeftFormatterOptions): string {\n const milliseconds = Number(value);\n if (milliseconds === null || isNaN(milliseconds)) {\n return 'Calculating...';\n }\n const durationInSeconds = Math.round(milliseconds / 1000);\n let format = options?.format;\n // Determine the best format if format is null\n if (isNil(format)) {\n if (durationInSeconds < 45) format = 's';\n else if (durationInSeconds < 60 * 45) format = 'm';\n else if (durationInSeconds < 60 * 60 * 22) format = 'h';\n else if (durationInSeconds < 60 * 60 * 24 * 26) format = 'd';\n else if (durationInSeconds < 60 * 60 * 24 * 320) format = 'M';\n else format = 'y';\n }\n\n // Helper function for zero-padding\n const pad = (num: number) => num.toString().padStart(2, '0');\n\n switch (format) {\n case 's':\n return `${durationInSeconds} seconds left`;\n case 'ss':\n return `${pad(durationInSeconds)} seconds left`;\n case 'm':\n return `${Math.round(durationInSeconds / 60)} minute${durationInSeconds >= 120 ? 's' : ''} left`;\n case 'mm':\n return `${pad(Math.round(durationInSeconds / 60))} minutes left`;\n case 'h':\n case 'H':\n if (durationInSeconds < 60 * 89) return 'an hour left';\n return `${Math.round(durationInSeconds / 3600)} hour${durationInSeconds >= 60 * 180 ? 's' : ''} left`;\n case 'hh':\n case 'HH':\n if (durationInSeconds < 60 * 89) return '01 hour left';\n return `${pad(Math.round(durationInSeconds / 3600))} hours left`;\n case 'd':\n case 'D':\n if (durationInSeconds < 60 * 60 * 35) return 'a day left';\n return `${Math.round(durationInSeconds / (3600 * 24))} day${durationInSeconds >= 60 * 60 * 70 ? 's' : ''} left`;\n case 'dd':\n case 'DD':\n if (durationInSeconds < 60 * 60 * 35) return '01 day left';\n return `${pad(Math.round(durationInSeconds / (3600 * 24)))} days left`;\n case 'M':\n if (durationInSeconds < 60 * 60 * 24 * 45) return 'a month left';\n return `${Math.round(durationInSeconds / (3600 * 24 * 30))} month${durationInSeconds >= 60 * 60 * 24 * 90 ? 's' : ''} left`;\n case 'MM':\n if (durationInSeconds < 60 * 60 * 24 * 45) return '01 month left';\n return `${pad(Math.round(durationInSeconds / (3600 * 24 * 30)))} months left`;\n case 'y':\n case 'Y':\n if (durationInSeconds < 60 * 60 * 24 * 547) return 'a year left';\n return `${Math.round(durationInSeconds / (3600 * 24 * 365))} year${durationInSeconds >= 60 * 60 * 24 * 730 ? 's' : ''} left`;\n case 'yy':\n case 'YY':\n case 'yyyy':\n case 'YYYY':\n if (durationInSeconds < 60 * 60 * 24 * 547) return '01 year left';\n return `${pad(Math.round(durationInSeconds / (3600 * 24 * 365)))} years left`;\n default:\n return 'Invalid format';\n }\n }\n}\n","import { AXFormatModule } from '@acorex/core/format';\nimport { NgModule } from '@angular/core';\nimport { AXDateTimePipe } from './datetime.pipe';\nimport { AXDateTimeFormatter } from './formatters/datetime-formatter';\nimport { AXTimeDurationFormatter } from './formatters/time-duration-formatter';\nimport { AXTimeLeftFormatter } from './formatters/timeleft-formatter';\n\n@NgModule({\n imports: [\n AXFormatModule.forChild({\n formatters: [AXDateTimeFormatter, AXTimeLeftFormatter, AXTimeDurationFormatter],\n }),\n ],\n exports: [AXDateTimePipe],\n declarations: [AXDateTimePipe],\n})\nexport class AXDateTimeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAwDsB,UAAU,CAAA;AAG9B;;AAEG;AACH,IAAA,WAAA,CAAY,MAAwB,EAAA;AAClC,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;KACvB;AAED,IAAA,IAAW,OAAO,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;KAC7B;AAED,IAAA,IAAW,OAAO,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;KAC7B;AAED,IAAA,IAAW,QAAQ,GAAA;AACjB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;KAC9B;AA2BF,CAAA;MAEY,UAAU,CAAA;AAGrB,IAAA,IAAI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;KACnB;AAGD,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IAED,WAAY,CAAA,KAAW,EAAE,QAAoB,EAAA;;AAyErC,QAAA,IAAA,CAAA,WAAW,GAAG;AACpB,YAAA,EAAE,EAAE,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAC7C,YAAA,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE;;YAE1C,EAAE,EAAE,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,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A,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,EAPzB,OAAA,EAAA,CAAA,cAAc,CAAC,QAAQ,CAAC;AACtB,gBAAA,UAAU,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,uBAAuB,CAAC;aAChF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAKO,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAT5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,cAAc,CAAC,QAAQ,CAAC;AACtB,4BAAA,UAAU,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,uBAAuB,CAAC;yBAChF,CAAC;AACH,qBAAA;oBACD,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,YAAY,EAAE,CAAC,cAAc,CAAC;AAC/B,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-core-date-time.mjs","sources":["../../../../libs/core/date-time/src/lib/datetime.class.ts","../../../../libs/core/date-time/src/lib/georgian.calendar.ts","../../../../libs/core/date-time/src/lib/jalali.calendar.ts","../../../../libs/core/date-time/src/lib/dateTime.config.ts","../../../../libs/core/date-time/src/lib/holidays.loader.ts","../../../../libs/core/date-time/src/lib/calendar.service.ts","../../../../libs/core/date-time/src/lib/datetime.pipe.ts","../../../../libs/core/date-time/src/lib/formatters/datetime-formatter.ts","../../../../libs/core/date-time/src/lib/formatters/time-duration-formatter.ts","../../../../libs/core/date-time/src/lib/formatters/timeleft-formatter.ts","../../../../libs/core/date-time/src/lib/datetime.module.ts","../../../../libs/core/date-time/src/acorex-core-date-time.ts"],"sourcesContent":["import { isBrowser } from '@acorex/core/platform';\nimport { translateSync } from '@acorex/core/translation';\nimport { defaults, orderBy } from 'lodash-es';\n\nexport type TimeUnit = 'ms' | 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year' | 'week';\n\nexport interface AXDateValue {\n year: number;\n month: number;\n date: number;\n hours?: number;\n minutes?: number;\n seconds?: number;\n ms?: number;\n}\n\nexport interface AXDateTimeDisplayFormats {\n dateInput: string;\n timeInput: string;\n dateTimeInput: string;\n dateDisplay: string;\n timeDisplay: string;\n dateTimeDisplay: string;\n}\n\nexport type AXDateTimeUnitNames = {\n long: string;\n short: string;\n letter: string;\n}[];\n\nexport type AXDateTimePart = {\n key: string;\n placeholder: string;\n placeholders: string[];\n typedValue?: string | null;\n default: number;\n enabled: boolean;\n realValue: () => string;\n};\n\nexport type AXDateTimeParts = {\n year: AXDateTimePart;\n month: AXDateTimePart;\n day: AXDateTimePart;\n hour: AXDateTimePart;\n minute: AXDateTimePart;\n second: AXDateTimePart;\n};\n\nexport interface AXCalendarConfig {\n weekdays: number[];\n weekend: number[];\n formats: AXDateTimeDisplayFormats;\n}\n\nexport abstract class AXCalendar {\n private _config: AXCalendarConfig;\n\n /**\n * @ignore\n */\n constructor(config: AXCalendarConfig) {\n this._config = config;\n }\n\n public get weekend(): number[] {\n return this._config.weekend;\n }\n\n public get formats(): AXDateTimeDisplayFormats {\n return this._config.formats;\n }\n\n public get weekdays(): number[] {\n return this._config.weekdays;\n }\n\n abstract name(): string;\n\n abstract dayOfMonth(date: Date): number;\n\n abstract dayOfYear(date: Date): number;\n\n abstract dayOfWeek(date: Date): number;\n\n abstract monthOfYear(date: Date): number;\n\n abstract weekOfYear(date: Date): number;\n\n abstract year(date: Date): number;\n\n abstract add(date: Date, unit: TimeUnit, amount: number): AXDateTime;\n\n abstract set(date: Date, unit: TimeUnit, value: number): AXDateTime;\n\n abstract startOf(date: Date, unit: TimeUnit): AXDateTime;\n\n abstract endOf(date: Date, unit: TimeUnit): AXDateTime;\n\n abstract create(value: AXDateValue): AXDateTime;\n\n abstract parse(value: string): AXDateTime;\n}\n\nexport class AXDateTime {\n private _date: Date;\n\n get date(): Date {\n return this._date;\n }\n\n private _calendar: AXCalendar;\n get calendar(): AXCalendar {\n return this._calendar;\n }\n\n constructor(value: Date, calendar: AXCalendar) {\n this._calendar = calendar;\n this._date = value;\n }\n\n clone(): AXDateTime {\n return new AXDateTime(this.date, this.calendar);\n }\n\n get dayOfMonth(): number {\n return this._calendar.dayOfMonth(this.date);\n }\n\n get dayOfYear(): number {\n return this._calendar.dayOfYear(this.date);\n }\n\n get dayOfWeek(): number {\n return this._calendar.dayOfWeek(this.date);\n }\n\n get hour(): number {\n return this._date.getHours();\n }\n\n get minute(): number {\n return this._date.getMinutes();\n }\n\n get second(): number {\n return this._date.getSeconds();\n }\n\n get year(): number {\n return this._calendar.year(this.date);\n }\n\n get monthOfYear(): number {\n return this._calendar.monthOfYear(this.date);\n }\n\n get weekOfYear(): number {\n return this._calendar.weekOfYear(this.date);\n }\n\n get month(): AXCalendarMonth {\n return new AXCalendarMonth(this);\n }\n\n add(unit: TimeUnit, amount: number): AXDateTime {\n return this._calendar.add(this.date, unit, amount);\n }\n\n set(unit: TimeUnit = 'day', value: number): AXDateTime {\n return this._calendar.set(this.date, unit, value);\n }\n\n duration(end: Date | AXDateTime): AXTimeSpan {\n const date = end instanceof AXDateTime ? end.date : (end as Date);\n const val = new AXDateTime(date, this.calendar);\n const range = new AXDateTimeRange(this, val);\n return range.duration();\n }\n\n startOf(unit: TimeUnit = 'day'): AXDateTime {\n return this._calendar.startOf(this.date, unit);\n }\n\n endOf(unit: TimeUnit = 'day'): AXDateTime {\n return this._calendar.endOf(this.date, unit);\n }\n\n //TODO: remove unused items\n private _formatKeys = {\n ss: () => this.pad(this.date.getSeconds(), 2),\n s: () => this.date.getSeconds().toString(),\n //\n dd: () => this.pad(this.calendar.dayOfMonth(this.date), 2),\n DD: () => this.pad(this.calendar.dayOfMonth(this.date), 2),\n d: () => this.calendar.dayOfMonth(this.date).toString(),\n //\n mm: () => this.pad(this.date.getMinutes(), 2),\n m: () => this.date.getMinutes().toString(),\n //\n MMMM: () => translateSync(`dateTime.months.${this.calendar.name()}.long.${this.calendar.monthOfYear(this.date) - 1}`),\n MMM: () => translateSync(`dateTime.months.${this.calendar.name()}.short.${this.calendar.monthOfYear(this.date) - 1}`),\n MM: () => this.pad(this.calendar.monthOfYear(this.date), 2),\n M: () => this.calendar.monthOfYear(this.date),\n //\n E: () => translateSync(`dateTime.weekdays.long.${this.calendar.weekdays[this.calendar.dayOfWeek(this.date) - 1]}`),\n DDD: () => translateSync(`dateTime.weekdays.short.${this.calendar.weekdays[this.calendar.dayOfWeek(this.date) - 1]}`),\n DDDD: () => this._formatKeys['E'](),\n //\n yyyy: () => this.pad(this.calendar.year(this.date), 4),\n YYYY: () => this.pad(this.calendar.year(this.date), 4),\n yy: () => this.pad(this.calendar.year(this.date), 4).substring(2),\n YY: () => this.pad(this.calendar.year(this.date), 4).substring(2),\n //\n HH: () => this.pad(this.date.getHours(), 2),\n H: () => this.date.getHours().toString(),\n //\n hh: () => this.pad(this.date.getHours() % 12 || 12, 2),\n h: () => (this.date.getHours() % 12 || 12).toString(),\n //\n A: () => (this.date.getHours() < 12 ? 'am' : 'pm'),\n a: () => (this.date.getHours() < 12 ? 'am' : 'pm'),\n date: (options) => this.format(this.getDateTimeFormatByLocale(options.locale, 'shortDate')),\n shortDate: (options) => this.format(this.getDateTimeFormatByLocale(options.locale, 'shortDate')),\n longDate: (options) => this.format(this.getDateTimeFormatByLocale(options.locale, 'longDate')),\n //\n shortTime: (options) => this.format(this.getDateTimeFormatByLocale(options.locale, 'shortTime')),\n time: (options) => this.format(this.getDateTimeFormatByLocale(options.locale, 'shortTime')),\n longTime: (options) => this.format(this.getDateTimeFormatByLocale(options.locale, 'longTime')),\n //\n datetime: (options) => this.format('date time', { locale: options.locale }),\n };\n\n protected _language = () => (isBrowser() ? navigator.language : 'en-GB');\n\n format(format: string = this.getDateTimeFormatByLocale(this._language(), 'shortDate'), options?: { locale?: string }): string {\n const effectiveOptions = defaults({}, options, {\n locale: this._language(),\n });\n const re = new RegExp(orderBy(Object.keys(this._formatKeys), (c) => c.length, ['desc']).join('|'), 'gi');\n return format.replace(re, (matched) => {\n const f = this._formatKeys[matched];\n const r = f(effectiveOptions);\n return r;\n });\n }\n\n getDateTimeFormatByLocale(locale: string, style: 'shortDate' | 'longDate' | 'shortTime' | 'longTime'): string {\n let options: Intl.DateTimeFormatOptions = {};\n switch (style) {\n case 'shortDate': // Year, Month, Day\n options = { year: 'numeric', month: '2-digit', day: '2-digit' };\n break;\n case 'longDate': // Weekday, Month name, Day, Year\n options = {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n };\n break;\n case 'shortTime': // Hour, Minute\n options = { hour: '2-digit', minute: '2-digit', hour12: false };\n break;\n case 'longTime': // Hour, Minute, Second\n options = {\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false,\n };\n break;\n }\n\n const formatter = new Intl.DateTimeFormat(locale, options);\n\n // Get parts of the date and/or time\n const parts = formatter.formatToParts(new Date());\n\n // Map parts to their respective format\n const formatMap: { [key: string]: string } = {\n day: 'dd',\n month: style == 'longDate' ? 'MMMM' : 'MM',\n year: 'yyyy',\n hour: 'HH',\n minute: 'mm',\n second: 'ss',\n weekday: 'E',\n literal: '',\n };\n\n // Construct the date and/or time format string\n return parts\n .map((part) => {\n if (part.type === 'literal') {\n // Use the literal part directly as separator\n return part.value;\n } else {\n return formatMap[part.type] || part.value;\n }\n })\n .join('');\n }\n\n private pad(n, width, z = '0') {\n n = n + '';\n return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;\n }\n\n equal(value: Date | AXDateTime, unit: TimeUnit = 'day') {\n return this.compare(value, unit) == 0;\n }\n\n compare(value: Date | AXDateTime, unit: TimeUnit = 'day') {\n const date = value instanceof AXDateTime ? value.date : (value as Date);\n const val = new AXDateTime(date, this.calendar);\n const func = (v1: number, v2: number) => {\n if (v1 == v2) {\n return 0;\n } else if (v1 > v2) {\n return 1;\n } else {\n return -1;\n }\n };\n let p = 0;\n switch (unit) {\n case 'year':\n return func(this.year, val.year);\n case 'week':\n p = this.compare(val, 'year');\n return p == 0 ? func(this.weekOfYear, val.weekOfYear) : p;\n case 'month':\n p = this.compare(val, 'year');\n return p == 0 ? func(this.monthOfYear, val.monthOfYear) : p;\n case 'day':\n p = this.compare(val, 'year');\n return p == 0 ? func(this.dayOfYear, val.dayOfYear) : p;\n case 'hour':\n p = this.compare(val, 'day');\n return p == 0 ? func(this.hour, val.hour) : p;\n case 'minute':\n p = this.compare(val, 'hour');\n return p == 0 ? func(this.minute, val.minute) : p;\n case 'second':\n p = this.compare(val, 'minute');\n return p == 0 ? func(this.second, val.second) : p;\n default:\n return func(this.date.getTime(), val.date.getTime());\n }\n }\n}\n\nexport class AXCalendarMonth {\n private _range: AXDateTimeRange;\n public get range(): AXDateTimeRange {\n return this._range;\n }\n public set range(v: AXDateTimeRange) {\n this._range = v;\n }\n\n public get totalDays(): number {\n return this.range.endTime.dayOfMonth;\n }\n\n constructor(date: AXDateTime) {\n this.index = date.date.getMonth();\n this.name = date.format('MMMM');\n this.range = new AXDateTimeRange(\n new AXDateTime(date.startOf('month').date, date.calendar),\n new AXDateTime(date.endOf('month').date, date.calendar),\n );\n }\n\n private readonly index: number;\n private readonly name: string;\n}\n\nexport interface AXTimeSpanTotal {\n miliseconds: number;\n seconds: number;\n minutes: number;\n hours: number;\n days: number;\n weeks: number;\n months: number;\n years: number;\n}\n\nexport interface AXTimeSpan {\n miliseconds: number;\n seconds: number;\n minutes: number;\n hours: number;\n days: number;\n months: number;\n years: number;\n total: AXTimeSpanTotal;\n}\n\nexport class AXDateTimeRange {\n private _startTime: AXDateTime;\n private _endTime: AXDateTime;\n\n public get startTime(): AXDateTime {\n return this._startTime;\n }\n\n public get endTime(): AXDateTime {\n return this._endTime;\n }\n\n constructor(startTime: AXDateTime, endTime: AXDateTime) {\n this._startTime = startTime;\n this._endTime = endTime;\n }\n\n duration(): AXTimeSpan {\n const result: AXTimeSpan = {\n miliseconds: 0,\n seconds: 0,\n minutes: 0,\n hours: 0,\n days: 0,\n months: 0,\n years: 0,\n total: {\n miliseconds: 0,\n seconds: 0,\n minutes: 0,\n hours: 0,\n days: 0,\n weeks: 0,\n months: 0,\n years: 0,\n },\n };\n\n const one_second = 1000;\n const one_min = one_second * 60;\n const one_hour = one_min * 60;\n const one_day = one_hour * 24;\n const one_week = one_day * 7;\n const one_year = 365.25 * one_day;\n const one_month = one_year / 12;\n const startTime = this._startTime.date.getTime();\n const endTime = this._endTime.date.getTime();\n const diff = Math.abs(endTime - startTime);\n //\n result.total.miliseconds = diff;\n result.total.seconds = Number((diff / one_second).toFixed(2));\n result.total.minutes = Number((diff / one_min).toFixed(2));\n result.total.hours = Number((diff / one_hour).toFixed(2));\n result.total.days = Number((diff / one_day).toFixed(2));\n result.total.weeks = Number((diff / one_week).toFixed(2));\n //\n // let months = (this.endTime.year - this.startTime.year) * 12;\n // months += this.endTime.monthOfYear - this.startTime.monthOfYear + 1;\n // if (this.endTime.dayOfYear < this.startTime.dayOfYear) {\n // months--;\n // }\n // result.total.months = Math.abs(months);\n // TODO: review\n result.total.months = Number((diff / one_month).toFixed(2));\n result.total.years = Number((diff / one_year).toFixed(2));\n //\n result.miliseconds = result.total.miliseconds % 1000;\n result.seconds = Number((result.total.seconds % 60).toFixed(0));\n result.minutes = Number((result.total.minutes % 60).toFixed(0));\n result.hours = Number((result.total.hours % 24).toFixed(0));\n // TODO: review\n result.days = Number((result.total.days % 30.4).toFixed(0));\n result.months = Number((result.total.months % 12).toFixed(0));\n result.years = Number(result.total.years.toFixed(0));\n return result;\n }\n\n enumurate(unit: TimeUnit = 'day', amount = 1): AXDateTime[] {\n const result: AXDateTime[] = [];\n let item = this._startTime.clone();\n while (item.compare(this._endTime, unit) < 1) {\n if (!result.some((c) => c.equal(item, unit))) {\n result.push(item);\n }\n item = item.add(unit, amount);\n }\n return result;\n }\n}\n","import { AXCalendar, AXCalendarConfig, AXDateTime, AXDateValue, TimeUnit } from './datetime.class';\n\nexport class GeorgianCalendar extends AXCalendar {\n /**\n * @ignore\n */\n constructor(config: AXCalendarConfig) {\n super(config);\n }\n\n create(value: AXDateValue): AXDateTime {\n return new AXDateTime(\n new Date(value.year, value.month - 1, value.date, value.hours || 0, value.minutes || 0, value.seconds || 0, value.ms || 0),\n this,\n );\n }\n\n name(): string {\n return 'georgian';\n }\n\n dayOfMonth(date: Date): number {\n return date.getDate();\n }\n\n dayOfYear(date: Date): number {\n let result = 0;\n let m = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n if (this.isLeap(date)) {\n m[1] = 29;\n }\n for (let i = 0; i < date.getMonth(); i++) {\n result = result + m[i];\n }\n result += date.getDate();\n return result;\n }\n\n dayOfWeek(date: Date): number {\n return date.getDay() + 1;\n }\n\n weekOfYear(date: Date): number {\n const firstDay = new AXDateTime(date, this).startOf('year');\n return Math.ceil(((date.getTime() - firstDay.date.getTime()) / 86400000 + firstDay.date.getDay() + 1) / 7);\n }\n\n year(date: Date): number {\n return date.getFullYear();\n }\n\n monthOfYear(date: Date): number {\n return date.getMonth() + 1;\n }\n\n add(date: Date, unit: TimeUnit, amount: number): AXDateTime {\n let value = date.valueOf();\n switch (unit) {\n case 'second':\n value += 1000 * amount;\n break;\n case 'minute':\n value += 60000 * amount;\n break;\n case 'hour':\n value += 3600000 * amount;\n break;\n case 'month': {\n const v = new Date(value);\n\n // Calculate the new year and month considering the amount\n let newYear = v.getFullYear();\n let newMonth = v.getMonth() + amount;\n\n // Adjust for year overflow or underflow\n while (newMonth > 11) {\n newMonth -= 12;\n newYear++;\n }\n while (newMonth < 0) {\n newMonth += 12;\n newYear--;\n }\n\n // Set the date to the first of the month to prevent overflow\n v.setDate(1);\n v.setFullYear(newYear);\n v.setMonth(newMonth);\n\n // Get the last day of the new month\n const lastDayOfMonth = new Date(newYear, newMonth + 1, 0).getDate();\n\n // Set the date to either the original day or the last day of the new month, whichever is smaller\n const originalDay = date.getDate();\n v.setDate(Math.min(originalDay, lastDayOfMonth));\n\n value = v.valueOf();\n break;\n }\n case 'week':\n value += 7 * 86400000 * amount;\n break;\n case 'year': {\n const newDate = new Date(value);\n newDate.setFullYear(newDate.getFullYear() + amount);\n // Handling for leap years: if the original date is February 29th, and the new year is not a leap year,\n // set the date to February 28th.\n if (date.getMonth() === 1 && date.getDate() === 29 && newDate.getMonth() !== 1) {\n newDate.setMonth(1);\n newDate.setDate(28);\n }\n value = newDate.valueOf();\n break;\n }\n case 'day':\n default:\n value += 86400000 * amount;\n }\n return new AXDateTime(new Date(value), this);\n }\n\n set(date: Date, unit: TimeUnit, value: number): AXDateTime {\n const clone = new Date(date.valueOf());\n switch (unit) {\n case 'second':\n clone.setHours(clone.getHours(), clone.getMinutes(), value, clone.getMilliseconds());\n break;\n case 'minute':\n clone.setHours(clone.getHours(), value, clone.getSeconds(), clone.getMilliseconds());\n break;\n case 'hour':\n clone.setHours(value, clone.getMinutes(), clone.getSeconds(), clone.getMilliseconds());\n break;\n default:\n case 'day':\n clone.setDate(value);\n break;\n case 'week':\n break;\n case 'month':\n clone.setMonth(Math.max(0, value - 1));\n break;\n case 'year':\n clone.setFullYear(value);\n break;\n }\n return new AXDateTime(clone, this);\n }\n\n startOf(date: Date, unit: TimeUnit): AXDateTime {\n const clone = new Date(date.valueOf());\n switch (unit) {\n case 'second':\n clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 0);\n return new AXDateTime(clone, this);\n case 'minute':\n clone.setHours(clone.getHours(), clone.getMinutes(), 0, 0);\n return new AXDateTime(clone, this);\n case 'hour':\n clone.setHours(clone.getHours(), 0, 0, 0);\n return new AXDateTime(clone, this);\n default:\n case 'day':\n clone.setHours(0, 0, 0, 0);\n return new AXDateTime(clone, this);\n case 'week': {\n const start = 1; // Week starts on Monday\n const day = clone.getDay();\n const diff = clone.getDate() - day + (day == 0 ? -6 : start - day);\n clone.setDate(diff);\n clone.setHours(0, 0, 0, 0);\n return new AXDateTime(clone, this);\n }\n case 'month':\n clone.setDate(1);\n return new AXDateTime(clone, this).startOf('day');\n case 'year':\n clone.setMonth(0);\n clone.setDate(1);\n return new AXDateTime(clone, this).startOf('day');\n }\n }\n\n endOf(date: Date, unit: TimeUnit): AXDateTime {\n const clone = new Date(date.valueOf());\n switch (unit) {\n case 'second':\n clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 999);\n return new AXDateTime(clone, this);\n case 'minute':\n clone.setHours(clone.getHours(), clone.getMinutes(), 59, 999);\n return new AXDateTime(clone, this);\n case 'hour':\n clone.setHours(clone.getHours(), 59, 59, 999);\n return new AXDateTime(clone, this);\n default:\n case 'day':\n clone.setHours(23, 59, 59, 999);\n return new AXDateTime(clone, this);\n case 'week':\n return this.startOf(date, 'week').add('day', 6).endOf('day');\n case 'month': {\n const dateObj = new Date(date.getFullYear(), date.getMonth() + 1, 0);\n dateObj.setHours(23, 59, 59, 999);\n return new AXDateTime(dateObj, this);\n }\n case 'year':\n clone.setMonth(11);\n return new AXDateTime(clone, this).endOf('month');\n }\n }\n\n isLeap(date: Date) {\n let leapYear = new Date(date.getFullYear(), 1, 29);\n return leapYear.getDate() == 29;\n }\n\n parse(value: string): AXDateTime {\n return new AXDateTime(new Date(value), this);\n }\n}\n","import { AXCalendar, AXCalendarConfig, AXDateTime, AXDateValue, TimeUnit } from './datetime.class';\n\nexport class JalaliCalendar extends AXCalendar {\n /**\n * @ignore\n */\n constructor(config: AXCalendarConfig) {\n super(config);\n }\n\n /*\n Jalaali years starting the 33-year rule.\n*/\n private breaks = [-61, 9, 38, 199, 426, 686, 756, 818, 1111, 1181, 1210, 1635, 2060, 2097, 2192, 2262, 2324, 2394, 2456, 3178];\n\n create(value: AXDateValue): AXDateTime {\n const a = this.toGregorian(value.year, value.month, value.date);\n return new AXDateTime(\n new Date(a.getFullYear(), a.getMonth(), a.getDate(), value.hours || 0, value.minutes || 0, value.seconds || 0, value.ms || 0),\n this,\n );\n }\n\n name(): string {\n return 'jalali';\n }\n\n dayOfMonth(date: Date): number {\n return this.toJalaali(date).day;\n }\n\n dayOfYear(date: Date): number {\n const j = this.toJalaali(date);\n return (j.month <= 6 ? (j.month - 1) * 31 : 6 * 31 + (j.month - 7) * 30) + j.day;\n }\n\n dayOfWeek(date: Date): number {\n return date.getDay() == 6 ? 1 : date.getDay() + 2;\n }\n\n weekOfYear(date: Date): number {\n //TODO : apply jalali\n const firstDay = new AXDateTime(date, this).startOf('year');\n return Math.ceil(((date.getTime() - firstDay.date.getTime()) / 86400000 + firstDay.date.getDay() + 1) / 7);\n }\n\n year(date: Date): number {\n return this.toJalaali(date).year;\n }\n\n monthOfYear(date: Date): number {\n return this.toJalaali(date).month;\n }\n\n add(date: Date, unit: TimeUnit, amount: number): AXDateTime {\n let value = date.valueOf();\n switch (unit) {\n case 'second':\n value += 1000 * amount;\n break;\n case 'minute':\n value += 60000 * amount;\n break;\n case 'hour':\n value += 3600000 * amount;\n break;\n case 'month': {\n // const v = new Date(value);\n // let jd = this.dayOfMonth(date);\n // let jm = this.monthOfYear(date);\n // let jy = this.year(date);\n // const nm = jm + amount;\n // const ny = nm % 12 ? Math.floor(nm / 12) : 0;\n // jy += ny;\n // jm = nm - ny * 12;\n // const vv = this.toGregorian(jy, jm, jd);\n // v.setFullYear(vv.getFullYear());\n // v.setMonth(vv.getMonth());\n // v.setDate(vv.getDate());\n // value = v.valueOf();\n // break;\n let jd = this.dayOfMonth(date);\n let jm = this.monthOfYear(date);\n let jy = this.year(date);\n\n let newMonth = jm + amount;\n let yearsToAdd = Math.floor(newMonth / 12);\n newMonth = newMonth % 12;\n if (newMonth <= 0) {\n newMonth += 12;\n yearsToAdd--;\n }\n\n jy += yearsToAdd;\n\n // Temporary set to first of the month to prevent rollover\n const tempDate = this.toGregorian(jy, newMonth, 1);\n const gregorianDate = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate());\n\n // Adjust the day to either the original day or the last day of the new month, whichever is smaller\n const lastDayOfNewMonth = this.jalaaliMonthLength(jy, newMonth); // Implement this method to find the last day in a Jalali month\n jd = Math.min(jd, lastDayOfNewMonth);\n\n const finalDate = this.toGregorian(jy, newMonth, jd);\n gregorianDate.setFullYear(finalDate.getFullYear());\n gregorianDate.setMonth(finalDate.getMonth());\n gregorianDate.setDate(finalDate.getDate());\n\n value = gregorianDate.valueOf();\n break;\n }\n case 'week':\n value += 7 * 86400000 * amount;\n break;\n case 'year': {\n const v = new Date(value);\n let jd = this.dayOfMonth(date);\n let jm = this.monthOfYear(date);\n let jy = this.year(date);\n const vv = this.toGregorian(jy + amount, jm, jd);\n v.setFullYear(vv.getFullYear());\n v.setMonth(vv.getMonth());\n v.setDate(vv.getDate());\n value = v.valueOf();\n break;\n }\n case 'day':\n default:\n value += 86400000 * amount;\n }\n return new AXDateTime(new Date(value), this);\n }\n\n set(date: Date, unit: TimeUnit, value: number): AXDateTime {\n const clone = new Date(date.valueOf());\n const jDate = this.toJalaali(clone);\n switch (unit) {\n case 'second':\n clone.setHours(clone.getHours(), clone.getMinutes(), value, clone.getMilliseconds());\n break;\n case 'minute':\n clone.setHours(clone.getHours(), value, clone.getSeconds(), clone.getMilliseconds());\n break;\n case 'hour':\n clone.setHours(value, clone.getMinutes(), clone.getSeconds(), clone.getMilliseconds());\n break;\n default:\n case 'day': {\n const gDate = this.toGregorian(jDate.year, jDate.month, value);\n clone.setDate(gDate.getDate());\n break;\n }\n case 'week':\n break;\n case 'month': {\n const gDate2 = this.toGregorian(jDate.year, value, jDate.day);\n clone.setMonth(gDate2.getMonth());\n break;\n }\n case 'year': {\n const gDate3 = this.toGregorian(value, jDate.month, jDate.day);\n clone.setFullYear(gDate3.getFullYear());\n break;\n }\n }\n return new AXDateTime(clone, this);\n }\n\n startOf(date: Date, unit: TimeUnit): AXDateTime {\n const clone = new Date(date.valueOf());\n switch (unit) {\n case 'second':\n clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 0);\n return new AXDateTime(clone, this);\n case 'minute':\n clone.setHours(clone.getHours(), clone.getMinutes(), 0, 0);\n return new AXDateTime(clone, this);\n case 'hour':\n clone.setHours(clone.getHours(), 0, 0, 0);\n return new AXDateTime(clone, this);\n default:\n case 'day':\n clone.setHours(0, 0, 0, 0);\n return new AXDateTime(clone, this);\n case 'week':\n return new AXDateTime(clone, this).add('day', -this.dayOfWeek(clone) + 1).startOf('day');\n case 'month': {\n const jy = this.year(date);\n const jm = this.monthOfYear(date);\n const gDate = this.toGregorian(jy, jm, 1);\n return new AXDateTime(gDate, this).startOf('day');\n }\n case 'year': {\n const jy = this.year(date);\n const gDate = this.toGregorian(jy, 1, 1);\n return new AXDateTime(gDate, this).startOf('day');\n }\n }\n }\n\n endOf(date: Date, unit: TimeUnit): AXDateTime {\n const clone = new Date(date.valueOf());\n switch (unit) {\n case 'second':\n clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 999);\n return new AXDateTime(clone, this);\n case 'minute':\n clone.setHours(clone.getHours(), clone.getMinutes(), 59, 999);\n return new AXDateTime(clone, this);\n case 'hour':\n clone.setHours(clone.getHours(), 59, 59, 999);\n return new AXDateTime(clone, this);\n default:\n case 'day':\n clone.setHours(23, 59, 59, 999);\n return new AXDateTime(clone, this);\n case 'week': {\n return this.startOf(date, 'week').add('day', 6).endOf('day');\n }\n case 'month': {\n const jy = this.year(date);\n const jm = this.monthOfYear(date);\n const jd = this.jalaaliMonthLength(jy, jm);\n const gDate = this.toGregorian(jy, jm, jd);\n return new AXDateTime(gDate, this).endOf('day');\n }\n case 'year': {\n const jy = this.year(date);\n const gDate = this.toGregorian(jy, 12, this.jalaaliMonthLength(jy, 12));\n return new AXDateTime(gDate, this).endOf('day');\n }\n }\n }\n\n parse(value: string): AXDateTime {\n const [y, M, d, h, m, s, ms] = value.split(/[^a-zA-Z0-9]+/gi);\n const date = this.toGregorian(Number(y) ?? 0, Number(M) ?? 1, Number(d) ?? 1);\n if (h != null) date.setHours(Number(h));\n if (m != null) date.setMinutes(Number(m));\n if (s != null) date.setSeconds(Number(s));\n if (ms != null) date.setMilliseconds(Number(d));\n return new AXDateTime(date, this);\n }\n\n /*\n Converts a Gregorian date to Jalaali.\n*/\n toJalaali(date: Date): { year: number; month: number; day: number } {\n const gd = date.getDate();\n const gm = date.getMonth() + 1;\n const gy = date.getFullYear();\n const r = this.d2j(this.g2d(gy, gm, gd));\n return {\n year: r.jy,\n month: r.jm,\n day: r.jd,\n };\n }\n\n /*\n Converts a Jalaali date to Gregorian.\n */\n toGregorian(jy, jm, jd): Date {\n const g = this.d2g(this.j2d(jy, jm, jd));\n return new Date(g.gy, g.gm - 1, g.gd);\n }\n\n /*\n Checks whether a Jalaali date is valid or not.\n */\n isValidJalaaliDate(jy, jm, jd) {\n return jy >= -61 && jy <= 3177 && jm >= 1 && jm <= 12 && jd >= 1 && jd <= this.jalaaliMonthLength(jy, jm);\n }\n\n /*\n Is this a leap year or not?\n */\n isLeapJalaaliYear(jy) {\n return this.jalCalLeap(jy) === 0;\n }\n\n /*\n Number of days in a given month in a Jalaali year.\n */\n jalaaliMonthLength(jy, jm) {\n if (jm <= 6) return 31;\n if (jm <= 11) return 30;\n if (this.isLeapJalaaliYear(jy)) return 30;\n return 29;\n }\n\n /*\n This determines if the Jalaali (Persian) year is\n leap (366-day long) or is the common year (365 days)\n \n @param jy Jalaali calendar year (-61 to 3177)\n @returns number of years since the last leap year (0 to 4)\n */\n private jalCalLeap(jy: number) {\n let bl = this.breaks.length,\n jp = this.breaks[0],\n jm,\n jump,\n leap,\n n,\n i;\n\n if (jy < jp || jy >= this.breaks[bl - 1]) throw new Error('Invalid Jalaali year ' + jy);\n\n for (i = 1; i < bl; i += 1) {\n jm = this.breaks[i];\n jump = jm - jp;\n if (jy < jm) break;\n jp = jm;\n }\n n = jy - jp;\n\n if (jump - n < 6) n = n - jump + this.div(jump + 4, 33) * 33;\n leap = this.mod(this.mod(n + 1, 33) - 1, 4);\n if (leap === -1) {\n leap = 4;\n }\n\n return leap;\n }\n\n private jalCal(jy: number, withoutLeap: boolean) {\n let bl = this.breaks.length,\n gy = jy + 621,\n leapJ = -14,\n jp = this.breaks[0],\n jm,\n jump,\n leap,\n leapG,\n march,\n n,\n i;\n\n if (jy < jp || jy >= this.breaks[bl - 1]) throw new Error('Invalid Jalaali year ' + jy);\n\n // Find the limiting years for the Jalaali year jy.\n for (i = 1; i < bl; i += 1) {\n jm = this.breaks[i];\n jump = jm - jp;\n if (jy < jm) break;\n leapJ = leapJ + this.div(jump, 33) * 8 + this.div(this.mod(jump, 33), 4);\n jp = jm;\n }\n n = jy - jp;\n\n // Find the number of leap years from AD 621 to the beginning\n // of the current Jalaali year in the Persian calendar.\n leapJ = leapJ + this.div(n, 33) * 8 + this.div(this.mod(n, 33) + 3, 4);\n if (this.mod(jump, 33) === 4 && jump - n === 4) leapJ += 1;\n\n // And the same in the Gregorian calendar (until the year gy).\n leapG = this.div(gy, 4) - this.div((this.div(gy, 100) + 1) * 3, 4) - 150;\n\n // Determine the Gregorian date of Farvardin the 1st.\n march = 20 + leapJ - leapG;\n\n // return with gy and march when we don't need leap\n if (withoutLeap) return { gy: gy, march: march };\n\n // Find how many years have passed since the last leap year.\n if (jump - n < 6) n = n - jump + this.div(jump + 4, 33) * 33;\n leap = this.mod(this.mod(n + 1, 33) - 1, 4);\n if (leap === -1) {\n leap = 4;\n }\n\n return {\n leap: leap,\n gy: gy,\n march: march,\n };\n }\n\n private j2d(jy, jm, jd): number {\n let r = this.jalCal(jy, true);\n return this.g2d(r.gy, 3, r.march) + (jm - 1) * 31 - this.div(jm, 7) * (jm - 7) + jd - 1;\n }\n\n private d2j(jdn: number) {\n let gy = this.d2g(jdn).gy, // Calculate Gregorian year (gy).\n jy = gy - 621,\n r = this.jalCal(jy, false),\n jdn1f = this.g2d(gy, 3, r.march),\n jd,\n jm,\n k;\n\n // Find number of days that passed since 1 Farvardin.\n k = jdn - jdn1f;\n if (k >= 0) {\n if (k <= 185) {\n // The first 6 months.\n jm = 1 + this.div(k, 31);\n jd = this.mod(k, 31) + 1;\n return {\n jy: jy,\n jm: jm,\n jd: jd,\n };\n } else {\n // The remaining months.\n k -= 186;\n }\n } else {\n // Previous Jalaali year.\n jy -= 1;\n k += 179;\n if (r.leap === 1) k += 1;\n }\n jm = 7 + this.div(k, 30);\n jd = this.mod(k, 30) + 1;\n return {\n jy: jy,\n jm: jm,\n jd: jd,\n };\n }\n\n private g2d(gy: number, gm: number, gd: number): number {\n let d = this.div((gy + this.div(gm - 8, 6) + 100100) * 1461, 4) + this.div(153 * this.mod(gm + 9, 12) + 2, 5) + gd - 34840408;\n d = d - this.div(this.div(gy + 100100 + this.div(gm - 8, 6), 100) * 3, 4) + 752;\n return d;\n }\n\n private d2g(jdn: number) {\n let j, i, gd, gm, gy;\n j = 4 * jdn + 139361631;\n j = j + this.div(this.div(4 * jdn + 183187720, 146097) * 3, 4) * 4 - 3908;\n i = this.div(this.mod(j, 1461), 4) * 5 + 308;\n gd = this.div(this.mod(i, 153), 5) + 1;\n gm = this.mod(this.div(i, 153), 12) + 1;\n gy = this.div(j, 1461) - 100100 + this.div(8 - gm, 6);\n return {\n gy: gy,\n gm: gm,\n gd: gd,\n };\n }\n\n private jalaaliWeek(jy: number, jm: number, jd: number): { saturday: any; friday: any } {\n let dayOfWeek = this.jalaaliToDateObject(jy, jm, jd, 0, 0, 0, 0).getDay();\n\n let startDayDifference = dayOfWeek == 6 ? 0 : -(dayOfWeek + 1);\n let endDayDifference = 6 + startDayDifference;\n\n return {\n saturday: this.d2j(this.j2d(jy, jm, jd + startDayDifference)),\n friday: this.d2j(this.j2d(jy, jm, jd + endDayDifference)),\n };\n }\n\n private jalaaliToDateObject(jy: number, jm: number, jd: number, h: number = 0, m: number = 0, s: number = 0, ms: number = 0) {\n let gregorianCalenderDate = this.toGregorian(jy, jm, jd);\n\n return new Date(\n gregorianCalenderDate.getFullYear(),\n gregorianCalenderDate.getMonth() - 1,\n gregorianCalenderDate.getDate(),\n h || 0,\n m || 0,\n s || 0,\n ms || 0,\n );\n }\n\n /*\n Utility helper functions.\n */\n\n private div(a: number, b: number) {\n return ~~(a / b);\n }\n\n private mod(a: number, b: number) {\n return a - ~~(a / b) * b;\n }\n}\n","import { AX_GLOBAL_CONFIG } from '@acorex/core/config';\nimport { InjectionToken, inject } from '@angular/core';\nimport { set } from 'lodash-es';\nimport { AXCalendar } from './datetime.class';\nimport { GeorgianCalendar } from './georgian.calendar';\nimport { JalaliCalendar } from './jalali.calendar';\n\nexport interface AXDateTimeConfig {\n calendar: string;\n calendars: {\n [key: string]: AXCalendar;\n };\n}\n\nexport const AX_DATETIME_CONFIG = new InjectionToken<AXDateTimeConfig>('AX_DATETIME_CONFIG', {\n providedIn: 'root',\n factory: () => {\n const global = inject(AX_GLOBAL_CONFIG);\n set(global, 'dateTime', AX_DATETIME_CONFIG);\n return AXDateTimeDefaultConfig;\n },\n});\n\nexport const AXDateTimeDefaultConfig: AXDateTimeConfig = {\n calendar: 'georgian',\n calendars: {\n georgian: new GeorgianCalendar({\n weekdays: [0, 1, 2, 3, 4, 5, 6],\n weekend: [5, 6],\n formats: {\n dateInput: 'yyyy/MM/dd',\n timeInput: 'HH:mm',\n dateTimeInput: 'yyyy/MM/dd HH:mm',\n dateDisplay: 'DDDD, d MMM yyyy',\n timeDisplay: 'HH:mm',\n dateTimeDisplay: 'DDDD, d MMM yyyy HH:mm',\n },\n }),\n jalali: new JalaliCalendar({\n weekdays: [6, 0, 1, 2, 3, 4, 5],\n weekend: [6],\n formats: {\n dateInput: 'yyyy/MM/dd',\n timeInput: 'HH:mm',\n dateTimeInput: 'yyyy/MM/dd HH:mm',\n dateDisplay: 'DDDD, d MMM yyyy',\n timeDisplay: 'HH:mm',\n dateTimeDisplay: 'DDDD, d MMM yyyy HH:mm',\n },\n }),\n },\n};\n\nexport type PartialDateTimeConfig = Partial<AXDateTimeConfig>;\n\nexport function dateTimeConfig(config: PartialDateTimeConfig = {}): AXDateTimeConfig {\n const result = {\n ...AXDateTimeDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface AXHolidayDate {\n date: Date;\n title: string;\n description?: string;\n [key: string]: unknown;\n}\n\nexport interface AXHolidaysLoaderOptions {\n calendar?: string;\n range?: { start: Date; end: Date };\n}\n\nexport interface AXHolidaysLoader {\n getHolidays(options?: AXHolidaysLoaderOptions): Promise<AXHolidayDate[]>;\n}\n\nexport class AXHolidaysLoaderDefault implements AXHolidaysLoader {\n getHolidays(options?: AXHolidaysLoaderOptions | undefined): Promise<AXHolidayDate[]> {\n return Promise.resolve([]);\n }\n}\n\nexport const AX_DATETIME_HOLIDAYS_LOADER = new InjectionToken<AXHolidaysLoader>('AX_DATETIME_HOLIDAYS_LOADER', {\n providedIn: 'root',\n factory: () => {\n return new AXHolidaysLoaderDefault();\n },\n});\n","import { AXEventService, AXEventTypes } from '@acorex/core/events';\nimport { Injectable, inject } from '@angular/core';\nimport { BehaviorSubject, Subject } from 'rxjs';\nimport { AXDateTimeConfig, AX_DATETIME_CONFIG } from './dateTime.config';\nimport { AXCalendar, AXDateTime, AXDateValue } from './datetime.class';\nimport { AXHolidayDate, AXHolidaysLoaderOptions, AX_DATETIME_HOLIDAYS_LOADER } from './holidays.loader';\n\n@Injectable({ providedIn: 'root' })\nexport class AXCalendarService {\n private config: AXDateTimeConfig = inject(AX_DATETIME_CONFIG);\n private _holidaysLoader = inject(AX_DATETIME_HOLIDAYS_LOADER);\n private eventService = inject(AXEventService);\n\n public get calendar(): AXCalendar {\n return this.getActiveCalendar();\n }\n\n private activeCalendar = new BehaviorSubject<AXCalendar>(this.getDefaultCalendar());\n calendarChanges$ = this.activeCalendar.asObservable();\n\n public getDefaultCalendar(): AXCalendar {\n return this.config.calendars[this.config.calendar];\n }\n\n public getActiveCalendar(): AXCalendar {\n return this.activeCalendar.getValue();\n }\n\n public setActiveCalendar(name: string): void {\n if (name != this.calendar.name()) {\n const calendar = this.resolveCalendar(name);\n this.activeCalendar.next(calendar);\n this.eventService.emitEvent({\n type: AXEventTypes.AXCalendarChanged,\n payload: this.getActiveCalendar(),\n });\n }\n }\n\n public onHolidaysChanged: Subject<AXHolidayDate[]> = new Subject<AXHolidayDate[]>();\n private _holidays: AXHolidayDate[] = [];\n public get holidays(): AXHolidayDate[] {\n return this._holidays;\n }\n\n constructor() {\n this.loadHolidays();\n }\n\n public loadHolidays(options?: AXHolidaysLoaderOptions) {\n return this._holidaysLoader.getHolidays(options).then((value) => {\n this._holidays = value;\n this.onHolidaysChanged.next(this._holidays);\n });\n }\n\n public create(value: AXDateValue, calendarName?: string): AXDateTime;\n public create(value: Date, calendarName?: string): AXDateTime;\n public create(value: AXDateValue | Date, calendarName?: string): AXDateTime {\n const calendar = calendarName ? this.resolveCalendar(calendarName) : this.calendar;\n if (value instanceof Date) {\n return new AXDateTime(value, calendar);\n } else if (value?.year && value?.month) {\n return calendar.create(value as AXDateValue);\n }\n return this.now();\n }\n\n public now(calendarName?: string): AXDateTime {\n const calendar = calendarName ? this.resolveCalendar(calendarName) : this.calendar;\n return new AXDateTime(new Date(), calendar);\n }\n\n public resolveCalendar(name: string): AXCalendar {\n const c = this.config.calendars[name];\n if (!c) {\n return this.calendar;\n }\n return c;\n }\n\n public convert(value: Date | AXDateTime | string, calendarName?: string): AXDateTime {\n const isISOString = (str) => {\n if (!/\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(.\\d{3}Z)?/.test(str)) return false;\n const d = new Date(str);\n return d instanceof Date && !isNaN(d.getTime()); // valid date\n };\n //\n const calendar = calendarName ? this.resolveCalendar(calendarName) : this.calendar;\n if (typeof value === 'string') {\n if (isISOString(value)) return new AXDateTime(new Date(value), calendar);\n else return calendar.parse(value);\n }\n const date = value instanceof AXDateTime ? value.date : (value as Date);\n return new AXDateTime(date, calendar);\n }\n}\n","import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { AXCalendarService } from './calendar.service';\nimport { AXDateTime } from './datetime.class';\n\n/**\n * @deprecated The pipe should not be used, use format instead\n */\n@Pipe({ name: 'axDate' })\nexport class AXDateTimePipe implements PipeTransform {\n private _calendarService: AXCalendarService = inject(AXCalendarService);\n\n transform(value: Date | AXDateTime | string, format?: string, calendarName?: string): string {\n if (value == null) {\n return '';\n }\n let calendar = this._calendarService.calendar;\n if (calendarName) {\n calendar = this._calendarService.resolveCalendar(calendarName);\n }\n const val: AXDateTime = this._calendarService.convert(value, calendar.name());\n return val.format(format);\n }\n}\n","import { AXFormatOptions, AXFormatter } from '@acorex/core/format';\nimport { Injectable, inject } from '@angular/core';\nimport { AXCalendarService } from '../calendar.service';\n\nexport interface AXDateTimeFormatterOptions extends AXFormatOptions {\n format?: string;\n calendar?: string;\n locale?: string;\n}\n\ndeclare module '@acorex/core/format' {\n interface AXFormatOptionsMap {\n datetime: AXDateTimeFormatterOptions;\n }\n}\n\n@Injectable()\nexport class AXDateTimeFormatter implements AXFormatter {\n private calendarService = inject(AXCalendarService);\n\n get name(): string {\n return 'datetime';\n }\n\n format(value: unknown, options?: AXDateTimeFormatterOptions | string): string {\n const effectiveOptions =\n typeof options == 'object'\n ? {\n format: options.format ?? 'date',\n locale: options.locale,\n calendar: options.calendar ?? this.calendarService.calendar.name(),\n }\n : {\n format: options,\n calendar: this.calendarService.calendar.name(),\n };\n\n const date:Date | null = (value instanceof Date ) ? value : \n (typeof value==\"number\" || typeof value==\"string\" ? new Date(value as any) : null) ;\n //\n if(!date)\n return \"\";\n //\n return this.calendarService\n .create(date, effectiveOptions.calendar as string)\n .format(effectiveOptions.format, { locale: effectiveOptions.locale });\n }\n}\n","import { AXFormatOptions, AXFormatter } from '@acorex/core/format';\nimport { Injectable } from '@angular/core';\n\nexport interface AXTimeDurationFormatterOptions extends AXFormatOptions {\n format: string;\n}\n\ndeclare module '@acorex/core/format' {\n interface AXFormatOptionsMap {\n duration: AXTimeDurationFormatterOptions;\n }\n}\n\n@Injectable()\nexport class AXTimeDurationFormatter implements AXFormatter {\n get name(): string {\n return 'time-duration';\n }\n\n format(value: number, options?: AXTimeDurationFormatterOptions): string {\n const milliseconds = Number(value);\n if (milliseconds === null || isNaN(milliseconds)) {\n return '...';\n }\n\n // Convert milliseconds to various units\n const totalMilliseconds = milliseconds % 1000;\n const totalSeconds = Math.floor(milliseconds / 1000);\n const seconds = totalSeconds % 60;\n const totalMinutes = Math.floor(totalSeconds / 60);\n const minutes = totalMinutes % 60;\n const totalHours = Math.floor(totalMinutes / 60);\n\n // Helper function for zero-padding\n const pad = (num: number, length = 2) => num.toString().padStart(length, '0');\n\n // Default format if none provided\n const format = options?.format || (totalHours >= 0 ? 'HH:mm:ss' : 'mm:ss');\n\n const formattedTime = [];\n\n // Parse format and build the time string accordingly\n if (format.includes('HH') || format.includes('H')) {\n formattedTime.push(pad(totalHours));\n }\n if (format.includes('mm')) {\n formattedTime.push(pad(minutes));\n } else if (format.includes('m')) {\n formattedTime.push(minutes.toString());\n }\n if (format.includes('ss')) {\n formattedTime.push(pad(seconds));\n } else if (format.includes('s')) {\n formattedTime.push(seconds.toString());\n }\n if (format.includes('ms') || format.includes('MS')) {\n formattedTime.push(pad(totalMilliseconds, 3));\n }\n\n // Join the parts according to the format\n return formattedTime.join(format.includes('ms') || format.includes('MS') ? ':' : ':');\n }\n}\n","import { AXFormatOptions, AXFormatter } from '@acorex/core/format';\nimport { Injectable } from '@angular/core';\nimport { isNil } from 'lodash-es';\n\nexport interface AXTimeLeftFormatterOptions extends AXFormatOptions {\n format: string;\n}\n\ndeclare module '@acorex/core/format' {\n interface AXFormatOptionsMap {\n timeleft: AXTimeLeftFormatterOptions;\n }\n}\n\n@Injectable()\nexport class AXTimeLeftFormatter implements AXFormatter {\n get name(): string {\n return 'timeleft';\n }\n\n format(value: number | string, options?: AXTimeLeftFormatterOptions): string {\n const valueNumber = Number(value);\n const sign = valueNumber >= 0 ? 'left' : 'ago';\n const milliseconds = Math.abs(valueNumber);\n const durationInSeconds = Math.round(milliseconds / 1000);\n let format = options?.format;\n // Determine the best format if format is null\n if (isNil(format)) {\n if (durationInSeconds < 45) format = 's';\n else if (durationInSeconds < 60 * 45) format = 'm';\n else if (durationInSeconds < 60 * 60 * 22) format = 'h';\n else if (durationInSeconds < 60 * 60 * 24 * 26) format = 'd';\n else if (durationInSeconds < 60 * 60 * 24 * 320) format = 'M';\n else format = 'y';\n }\n\n // Helper function for zero-padding\n const pad = (num: number) => num.toString().padStart(2, '0');\n\n switch (format) {\n case 's':\n return `${durationInSeconds} seconds ${sign}`;\n case 'ss':\n return `${pad(durationInSeconds)} seconds ${sign}`;\n case 'm':\n return `${Math.round(durationInSeconds / 60)} minute${durationInSeconds >= 120 ? 's' : ''} ${sign}`;\n case 'mm':\n return `${pad(Math.round(durationInSeconds / 60))} minutes ${sign}`;\n case 'h':\n case 'H':\n if (durationInSeconds < 60 * 89) return `an hour ${sign}`;\n return `${Math.round(durationInSeconds / 3600)} hour${durationInSeconds >= 60 * 180 ? 's' : ''} ${sign}`;\n case 'hh':\n case 'HH':\n if (durationInSeconds < 60 * 89) return `01 hour ${sign}`;\n return `${pad(Math.round(durationInSeconds / 3600))} hours ${sign}`;\n case 'd':\n case 'D':\n if (durationInSeconds < 60 * 60 * 35) return `a day ${sign}`;\n return `${Math.round(durationInSeconds / (3600 * 24))} day${durationInSeconds >= 60 * 60 * 70 ? 's' : ''} ${sign}`;\n case 'dd':\n case 'DD':\n if (durationInSeconds < 60 * 60 * 35) return `01 day ${sign}`;\n return `${pad(Math.round(durationInSeconds / (3600 * 24)))} days ${sign}`;\n case 'M':\n if (durationInSeconds < 60 * 60 * 24 * 45) return `a month ${sign}`;\n return `${Math.round(durationInSeconds / (3600 * 24 * 30))} month${durationInSeconds >= 60 * 60 * 24 * 90 ? 's' : ''} ${sign}`;\n case 'MM':\n if (durationInSeconds < 60 * 60 * 24 * 45) return `01 month ${sign}`;\n return `${pad(Math.round(durationInSeconds / (3600 * 24 * 30)))} months ${sign}`;\n case 'y':\n case 'Y':\n if (durationInSeconds < 60 * 60 * 24 * 547) return `a year ${sign}`;\n return `${Math.round(durationInSeconds / (3600 * 24 * 365))} year${durationInSeconds >= 60 * 60 * 24 * 730 ? 's' : ''} ${sign}`;\n case 'yy':\n case 'YY':\n case 'yyyy':\n case 'YYYY':\n if (durationInSeconds < 60 * 60 * 24 * 547) return `01 year ${sign}`;\n return `${pad(Math.round(durationInSeconds / (3600 * 24 * 365)))} years ${sign}`;\n default:\n return 'Invalid format';\n }\n }\n}\n","import { AXFormatModule } from '@acorex/core/format';\nimport { NgModule } from '@angular/core';\nimport { AXDateTimePipe } from './datetime.pipe';\nimport { AXDateTimeFormatter } from './formatters/datetime-formatter';\nimport { AXTimeDurationFormatter } from './formatters/time-duration-formatter';\nimport { AXTimeLeftFormatter } from './formatters/timeleft-formatter';\n\n@NgModule({\n imports: [\n AXFormatModule.forChild({\n formatters: [AXDateTimeFormatter, AXTimeLeftFormatter, AXTimeDurationFormatter],\n }),\n ],\n exports: [AXDateTimePipe],\n declarations: [AXDateTimePipe],\n})\nexport class AXDateTimeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAwDsB,UAAU,CAAA;AAG9B;;AAEG;AACH,IAAA,WAAA,CAAY,MAAwB,EAAA;AAClC,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;KACvB;AAED,IAAA,IAAW,OAAO,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;KAC7B;AAED,IAAA,IAAW,OAAO,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;KAC7B;AAED,IAAA,IAAW,QAAQ,GAAA;AACjB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;KAC9B;AA2BF,CAAA;MAEY,UAAU,CAAA;AAGrB,IAAA,IAAI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;KACnB;AAGD,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IAED,WAAY,CAAA,KAAW,EAAE,QAAoB,EAAA;;AAyEr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,EAAE,uBAAuB,CAAC;yBAChF,CAAC;AACH,qBAAA;oBACD,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,YAAY,EAAE,CAAC,cAAc,CAAC;AAC/B,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@acorex/core",
|
3
|
-
"version": "18.12.
|
3
|
+
"version": "18.12.14",
|
4
4
|
"peerDependencies": {
|
5
5
|
"@angular/common": ">=18.2.0",
|
6
6
|
"@angular/core": ">=18.2.0",
|
@@ -32,24 +32,18 @@
|
|
32
32
|
"esm": "./esm2022/common/acorex-core-common.mjs",
|
33
33
|
"default": "./fesm2022/acorex-core-common.mjs"
|
34
34
|
},
|
35
|
-
"./file": {
|
36
|
-
"types": "./file/index.d.ts",
|
37
|
-
"esm2022": "./esm2022/file/acorex-core-file.mjs",
|
38
|
-
"esm": "./esm2022/file/acorex-core-file.mjs",
|
39
|
-
"default": "./fesm2022/acorex-core-file.mjs"
|
40
|
-
},
|
41
|
-
"./events": {
|
42
|
-
"types": "./events/index.d.ts",
|
43
|
-
"esm2022": "./esm2022/events/acorex-core-events.mjs",
|
44
|
-
"esm": "./esm2022/events/acorex-core-events.mjs",
|
45
|
-
"default": "./fesm2022/acorex-core-events.mjs"
|
46
|
-
},
|
47
35
|
"./config": {
|
48
36
|
"types": "./config/index.d.ts",
|
49
37
|
"esm2022": "./esm2022/config/acorex-core-config.mjs",
|
50
38
|
"esm": "./esm2022/config/acorex-core-config.mjs",
|
51
39
|
"default": "./fesm2022/acorex-core-config.mjs"
|
52
40
|
},
|
41
|
+
"./file": {
|
42
|
+
"types": "./file/index.d.ts",
|
43
|
+
"esm2022": "./esm2022/file/acorex-core-file.mjs",
|
44
|
+
"esm": "./esm2022/file/acorex-core-file.mjs",
|
45
|
+
"default": "./fesm2022/acorex-core-file.mjs"
|
46
|
+
},
|
53
47
|
"./format": {
|
54
48
|
"types": "./format/index.d.ts",
|
55
49
|
"esm2022": "./esm2022/format/acorex-core-format.mjs",
|
@@ -62,6 +56,12 @@
|
|
62
56
|
"esm": "./esm2022/date-time/acorex-core-date-time.mjs",
|
63
57
|
"default": "./fesm2022/acorex-core-date-time.mjs"
|
64
58
|
},
|
59
|
+
"./events": {
|
60
|
+
"types": "./events/index.d.ts",
|
61
|
+
"esm2022": "./esm2022/events/acorex-core-events.mjs",
|
62
|
+
"esm": "./esm2022/events/acorex-core-events.mjs",
|
63
|
+
"default": "./fesm2022/acorex-core-events.mjs"
|
64
|
+
},
|
65
65
|
"./image": {
|
66
66
|
"types": "./image/index.d.ts",
|
67
67
|
"esm2022": "./esm2022/image/acorex-core-image.mjs",
|