▲ Format a JavaScript Date to YYYY MM DD - Mastering JS at masteringjs.io▼1 up and 0 down, posted by vkarpov15 1079 days ago 2 comments
jaleksic 1079 days ago. link 2 points ▲ ▼I think the `* 1e4` trick is far less readable and understandable than the `en-GB` one :)
tracker1 1076 days ago. link 1 point ▲ ▼Slightly simpler path... new Date().toJSON().substr(0,10).split('-').join(''); If you want it locallzed, add the offset before the toJSON, but I nearly always work in UTC.