Improve date parsing

This commit is contained in:
Peter Stuifzand 2020-10-26 23:30:03 +01:00
parent db5603c5cd
commit 955f60abe8

View File

@ -10,9 +10,11 @@ function date(x) {
}
if (_.isString(x)) {
let r = x.match(/^\[\[(.+)\]\]$/);
if (r) {
return moment(r[1], "DD MMM YYYY")
}
return moment(x);
}
return moment(x, "YYYY-MM-DD");
}
/**