Skip to content

Instantly share code, notes, and snippets.

View Lovatt's full-sized avatar

Daniel Lovatt Lovatt

View GitHub Profile
@neilrackett
neilrackett / php-to-moment.js
Last active December 13, 2022 07:39
Convert PHP date string to Moment.js format
function phpToMoment(str) {
let replacements = {
'd' : 'DD',
'D' : 'ddd',
'j' : 'D',
'l' : 'dddd',
'N' : 'E',
'S' : 'o',
'w' : 'e',