How to get the current date/time in Javascript: YYYY-MM-DD HH:MM:SS format

Because I'm tired of having to google it every time. Note that this will be in military time:

new Date().toISOString().replace(/T/, ' ').replace(/\..+/, '');

Comments

Popular posts from this blog

Dream jobs list

Hobble Creek Half: The slow passage of time marches us towards our inevitable death

St. George Marathon: 3:08, but at what cost? 💩 (TMI alert)