@annalib/anna-core 2.7.4 → 2.7.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.
@@ -334,6 +334,12 @@ class AnnaDateTimeFormatService {
334
334
  compareDate(a, b, isAsc) {
335
335
  return isAsc ? moment(a).diff(b) : moment(b).diff(a);
336
336
  }
337
+ static formatTwentyFourHourTimeToHHMMAFormat(value) {
338
+ value = moment(value, ["HH:mm:ss"]).format("HH:mm:ss");
339
+ return value[3] == "0" && value[4] == "0"
340
+ ? moment(value, ["HH:mm:ss"]).format("hA").slice(0, -1)
341
+ : moment(value, ["HH:mm:ss"]).format("h:mmA").slice(0, -1);
342
+ }
337
343
  formatDateAndHHMMATimeToStandardFormat(dateAndTime) {
338
344
  let standardFormat, date, time;
339
345
  if (dateAndTime.includes("|")) {