ISO 8601 to readable date

Hi there. I’m using a custom API with Nightbot and this custom API gives you an “updated at” date encoded in ISO 8601 (2021-07-30T15:40:23.000Z). Is there any way I can convert this date to a more human readable one within the command? Pretty sure can’t do it with javascript math but I just don’t know.

Thank you.

Using vanilla js you can do the following:

const event = new Date('2021-07-30T15:40:23.000Z');
event.toString();
// "Fri Jul 30 2021 09:40:23 GMT-0600 (Mountain Daylight Time)"

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.