getTimezoneOffset:
Show the difference between the Date object and UTC time. If local time is ahead of UTC time, then the negative value will return within a minute. If local time is behind UTC time, then the positive value will return.
toLocalDateString:
const date = new Date(); console.log( date.toLocaleDateString("bn-bd", { day: "numeric", month: "long", year: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }) ); Return: ১৯ এপ্রিল, ২০২২ ১:১৭:০৯ AM
Post a Comment