@annalib/anna-core 6.0.3 → 6.0.5
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 +5 -5
- package/fesm2015/annalib-anna-core.mjs +4 -4
- package/fesm2015/annalib-anna-core.mjs.map +1 -1
- package/fesm2020/annalib-anna-core.mjs +4 -4
- package/fesm2020/annalib-anna-core.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -378,16 +378,16 @@ class AnnaDateTimeFormatService {
|
|
|
378
378
|
return isAsc ? dayjs(a).diff(b) : dayjs(b).diff(a);
|
|
379
379
|
}
|
|
380
380
|
static formatTwentyFourHourTimeToHHMMAFormat(value, date) {
|
|
381
|
-
value = dayjs(date ? date : '01/01/2000 ' + value).format("
|
|
381
|
+
value = dayjs(date ? date : '01/01/2000 ' + value).format("HH:mm:ss");
|
|
382
382
|
return value[3] == "0" && value[4] == "0"
|
|
383
383
|
? dayjs(value, ["HH:mm:ss"]).format("hA").slice(0, -1)
|
|
384
384
|
: dayjs(value, ["HH:mm:ss"]).format("h:mmA").slice(0, -1);
|
|
385
385
|
}
|
|
386
386
|
static formatTwelveHourTimeToHHMMAFormat(timeValue, date) {
|
|
387
|
-
timeValue = dayjs(date ? date : '01/01/2000 ' + timeValue).format("
|
|
387
|
+
timeValue = dayjs(date ? date : '01/01/2000 ' + timeValue).format("HH:mm:ss");
|
|
388
388
|
return timeValue[3] == "0" && timeValue[4] == "0"
|
|
389
|
-
? dayjs(timeValue).format("hA").slice(0, -1)
|
|
390
|
-
: dayjs(timeValue).format("h:mmA").slice(0, -1);
|
|
389
|
+
? dayjs(timeValue, ["HH:mm:ss"]).format("hA").slice(0, -1)
|
|
390
|
+
: dayjs(timeValue, ["HH:mm:ss"]).format("h:mmA").slice(0, -1);
|
|
391
391
|
}
|
|
392
392
|
formatDateAndHHMMATimeToStandardFormat(dateAndTime) {
|
|
393
393
|
let standardFormat, date, time;
|