Homelab, Linux, JS & ABAP (~˘▾˘)~
 

[JavaScript] Format date object using Intl to dd.MM.yyyy, hh:mm:ss

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl

const now = Intl.DateTimeFormat('de', { 
  dateStyle: 'medium',
  timeStyle: 'medium'
}).format( Date.now() )

console.log( now )

Leave a Reply

Your email address will not be published. Required fields are marked *