Is there a way to convert following date which is in "en-US" time for "en-GB" time format using npm dateFormat library.I'm trying this to prevent showing 24:00 as 00:00.
var date = new DateTime(dt - 36000000)
date = dateFormat(date, "HH:mm")
Javascript treats 24:00 as 00:00.
00:00 is the standard format.
However, if you have a specific requirement of showing it as 24:00. You can simply replace:
import dateFormat from "dateformat";
let date = new Date("2022-03-04 24:00");
date = dateFormat(date, "HH:mm").replace("00:", "24:")
console.log(date);