@acorex/core 20.1.5 → 20.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,10 +44,10 @@ class AXDateTime {
44
44
  // 0 1 ... 5 6 day of week ***
45
45
  d: () => (this.calendar.dayOfWeek(this.date) - 1).toString(),
46
46
  // Su Mo ... Fr Sa ***
47
- dd: () => translateSync(`dateTime.weekdays.short.${this.calendar.weekdays[this.calendar.dayOfWeek(this.date) - 1]}`),
48
- ddd: () => translateSync(`dateTime.weekdays.short.${this.calendar.weekdays[this.calendar.dayOfWeek(this.date) - 1]}`),
47
+ dd: () => translateSync(`@acorex:dateTime.weekdays.short.${this.calendar.weekdays[this.calendar.dayOfWeek(this.date) - 1]}`),
48
+ ddd: () => translateSync(`@acorex:dateTime.weekdays.short.${this.calendar.weekdays[this.calendar.dayOfWeek(this.date) - 1]}`),
49
49
  // Sunday Monday ... Friday Saturday
50
- dddd: () => translateSync(`dateTime.weekdays.long.${this.calendar.weekdays[this.calendar.dayOfWeek(this.date) - 1]}`),
50
+ dddd: () => translateSync(`@acorex:dateTime.weekdays.long.${this.calendar.weekdays[this.calendar.dayOfWeek(this.date) - 1]}`),
51
51
  // 1 2 ... 30 31
52
52
  D: () => this.calendar.dayOfMonth(this.date).toString(),
53
53
  // 01 02 ... 30 31 day of month
@@ -65,17 +65,17 @@ class AXDateTime {
65
65
  // 01 02 ... 11 12
66
66
  MM: () => this.pad(this.calendar.monthOfYear(this.date), 2),
67
67
  // Jan Feb ... Nov Dec
68
- MMM: () => translateSync(`dateTime.months.${this.calendar.name()}.short.${this.calendar.monthOfYear(this.date) - 1}`),
68
+ MMM: () => translateSync(`@acorex:dateTime.months.${this.calendar.name()}.short.${this.calendar.monthOfYear(this.date) - 1}`),
69
69
  // January February ... November December
70
- MMMM: () => translateSync(`dateTime.months.${this.calendar.name()}.long.${this.calendar.monthOfYear(this.date) - 1}`),
70
+ MMMM: () => translateSync(`@acorex:dateTime.months.${this.calendar.name()}.long.${this.calendar.monthOfYear(this.date) - 1}`),
71
71
  // 1 2 ... 7
72
72
  E: () => this.calendar.dayOfWeek(this.date).toString(),
73
73
  // 01 02 ... 07
74
74
  EE: () => this.pad(this.calendar.dayOfWeek(this.date), 2),
75
75
  // Sun Mon ... Sat
76
- EEE: () => translateSync(`dateTime.weekdays.short.${this.calendar.weekdays[this.calendar.dayOfWeek(this.date) - 1]}`),
76
+ EEE: () => translateSync(`@acorex:dateTime.weekdays.short.${this.calendar.weekdays[this.calendar.dayOfWeek(this.date) - 1]}`),
77
77
  // Sunday Monday ... Saturday
78
- EEEE: () => translateSync(`dateTime.weekdays.long.${this.calendar.weekdays[this.calendar.dayOfWeek(this.date) - 1]}`),
78
+ EEEE: () => translateSync(`@acorex:dateTime.weekdays.long.${this.calendar.weekdays[this.calendar.dayOfWeek(this.date) - 1]}`),
79
79
  // 1 2 ... 2020 ...
80
80
  y: () => this.calendar.year(this.date).toString(),
81
81
  // 70 71 ... 29 30
@@ -1381,14 +1381,14 @@ class AXTimeDurationFormatter {
1381
1381
  if (ms <= 0)
1382
1382
  return '';
1383
1383
  const translations = await Promise.all([
1384
- this.translationService.translateAsync('dateTime.year'),
1385
- this.translationService.translateAsync('dateTime.month'),
1386
- this.translationService.translateAsync('dateTime.week'),
1387
- this.translationService.translateAsync('dateTime.day'),
1388
- this.translationService.translateAsync('dateTime.hour'),
1389
- this.translationService.translateAsync('dateTime.minute'),
1390
- this.translationService.translateAsync('dateTime.second'),
1391
- this.translationService.translateAsync('dateTime.millisecond'),
1384
+ this.translationService.translateAsync('@acorex:dateTime.units.year'),
1385
+ this.translationService.translateAsync('@acorex:dateTime.units.month'),
1386
+ this.translationService.translateAsync('@acorex:dateTime.units.week'),
1387
+ this.translationService.translateAsync('@acorex:dateTime.units.day'),
1388
+ this.translationService.translateAsync('@acorex:dateTime.units.hour'),
1389
+ this.translationService.translateAsync('@acorex:dateTime.units.minute'),
1390
+ this.translationService.translateAsync('@acorex:dateTime.units.second'),
1391
+ this.translationService.translateAsync('@acorex:dateTime.units.millisecond'),
1392
1392
  ]);
1393
1393
  const units = [
1394
1394
  { key: 'YEAR', label: translations[0].toLocaleUpperCase(), value: 1000 * 60 * 60 * 24 * 365 },
@@ -1427,7 +1427,12 @@ class AXTimeDurationFormatter {
1427
1427
  return `${paddedCount} (${unit.label})`;
1428
1428
  }
1429
1429
  });
1430
- return result.join(' : ');
1430
+ if (this.translationService.getActiveLang() === 'fa-IR') {
1431
+ return result.reverse().join(' : ');
1432
+ }
1433
+ else {
1434
+ return result.join(' : ');
1435
+ }
1431
1436
  }
1432
1437
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXTimeDurationFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1433
1438
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXTimeDurationFormatter }); }