@annalib/anna-core 4.3.4 → 4.3.6
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.
- package/esm2020/lib/anna-core-shared-lib/services/anna-date-time-format.service.mjs +8 -8
- package/fesm2015/annalib-anna-core.mjs +7 -7
- package/fesm2015/annalib-anna-core.mjs.map +1 -1
- package/fesm2020/annalib-anna-core.mjs +7 -7
- package/fesm2020/annalib-anna-core.mjs.map +1 -1
- package/lib/anna-core-shared-lib/services/anna-date-time-format.service.d.ts +2 -2
- package/package.json +1 -1
|
@@ -375,17 +375,17 @@ class AnnaDateTimeFormatService {
|
|
|
375
375
|
compareDate(a, b, isAsc) {
|
|
376
376
|
return isAsc ? dayjs(a).diff(b) : dayjs(b).diff(a);
|
|
377
377
|
}
|
|
378
|
-
static formatTwentyFourHourTimeToHHMMAFormat(value) {
|
|
379
|
-
value = dayjs(
|
|
378
|
+
static formatTwentyFourHourTimeToHHMMAFormat(value, date) {
|
|
379
|
+
value = dayjs(date ? date : '01/01/2000 ' + value).format("DD/MM/YYYY HH:mm:ss");
|
|
380
380
|
return value[3] == "0" && value[4] == "0"
|
|
381
381
|
? dayjs(value, ["HH:mm:ss"]).format("hA").slice(0, -1)
|
|
382
382
|
: dayjs(value, ["HH:mm:ss"]).format("h:mmA").slice(0, -1);
|
|
383
383
|
}
|
|
384
|
-
static formatTwelveHourTimeToHHMMAFormat(
|
|
385
|
-
|
|
386
|
-
return
|
|
387
|
-
? dayjs(
|
|
388
|
-
: dayjs(
|
|
384
|
+
static formatTwelveHourTimeToHHMMAFormat(timeValue, date) {
|
|
385
|
+
timeValue = dayjs(date ? date : '01/01/2000 ' + timeValue).format("DD/MM/YYYY HH:mm:ss");
|
|
386
|
+
return timeValue[3] == "0" && timeValue[4] == "0"
|
|
387
|
+
? dayjs(timeValue).format("hA").slice(0, -1)
|
|
388
|
+
: dayjs(timeValue).format("h:mmA").slice(0, -1);
|
|
389
389
|
}
|
|
390
390
|
formatDateAndHHMMATimeToStandardFormat(dateAndTime) {
|
|
391
391
|
let standardFormat, date, time;
|