Skip to content

Instantly share code, notes, and snippets.

@odykyi
Created October 29, 2019 14:20
Show Gist options
  • Save odykyi/5148c8558573cdfca2dc1b6694491b5a to your computer and use it in GitHub Desktop.
Save odykyi/5148c8558573cdfca2dc1b6694491b5a to your computer and use it in GitHub Desktop.
date formats for momentjs
const formats = [
'HH:mm:ss',
'DD/MM/YYYY',
'D MMMM YYYY',
'D MMMM YYYY HH:mm',
'dddd D MMMM YYYY HH:mm',
'DD.MM.YYYY HH:mm',
'MM-DD-YYYY HH:mm:ss',
'YYYY-MM-DD HH:mm',
'YYYY-MM-DD HH:mm:ss',
'YYYY-MM-DDTHH:mm:ssZ',
'YYYY-MM-DD',
'MM-DD-YYYY',
'YYYY-MM-DD LT',
'MM/DD/YYYY',
'M/D/YYYY',
'DD.MM.YYYY',
'DD-MM-YYYY',
'MMMM Do YYYY',
'MMM D YYYY',
'MMMM Do YYYY LT',
'MMM D YYYY LT',
'dddd, MMMM Do YYYY LT',
'ddd, MMM D YYYY LT',
'YYYY-MM',
'YYYY-MM-DD h:mm:ss A'
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment