We are using this date format in our app: 2021-03-20T15:42:02+01:00
, but I can't make it with pure javascript.
In the past we used moment.js
, but I want to avoid it.
In moment, the syntax was the following:
moment().format()
//output: 2021-03-20T15:59:13+01:00
this was the closest to what I found in pure js...
new Date().toISOString()
//output: 2021-03-20T14:59:13.595Z
Is there an "easy" way to achieve the same format as above?