Little help on format a date for an insert

looking at app/lib/core/util.js it is currently only PHP but it should be really easy to add it in:

  1. find the formatDate function (line 141)
  2. add a w (anwhere in the yMdHhmsaAv bit) into the regular expression (line 157) e.g.
return format.replace(/([yMdHwhmsaAv])(\1+)?/g, part => {
  1. add case 'w': return w; to the end of the switch cases
    image

  2. Save and test

If something doesn't work (not that it should), you can reset the file using the Project Asset Updater tool

1 Like