Skip to main content

DateInterface Constructor for new date object (with epoch)

new Date()

to return new Date Object with epoch

epoch

integer # milliseconds since Jan 1 1970

Date.now()

to return epoch number

Intl.DateTimeFormat("en-GB").format(new Date(__EPOCH))

to parse epoch into dd/mm/yy - (apparently this also works in node runtime?!). DateTimeFormat is a useful shortcut to get locale specific formatting - less boilerplate vs config object params

References