A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
core: add more date formats
Abdullah Attaefd0d6c2c30d
diff --git a/packages/core/common.js b/packages/core/common.jsindex 78faef1b6..34ab623f3 100644--- a/packages/core/common.js+++ b/packages/core/common.js@@ -106,13 +106,22 @@ export const EVENTS = {systemTimeInvalid: "system:invalidTime"};+const separators = ["-", "/"];export const DATE_FORMATS = [- "MM-DD-YYYY",- "DD-MM-YYYY",- "YYYY-MM-DD",- "DD/MM/YYYY",- "YYYY/MM/DD",- "MM/DD/YYYY",+ ...separators+ .map((sep) => {+ const DD = "DD";+ const MM = "MM";+ const YYYY = "YYYY";++ return [+ [DD, MM, YYYY].join(sep),+ [MM, DD, YYYY].join(sep),+ [YYYY, DD, MM].join(sep),+ [YYYY, MM, DD].join(sep)+ ];+ })+ .flat(),"MMM D, YYYY"];