Replaced moment.js with simple extended Date.prototype

This commit is contained in:
djmaze 2020-08-07 14:44:33 +02:00
parent a0dcd93fea
commit b1678a1566
6 changed files with 218 additions and 28 deletions

View file

@ -118,9 +118,9 @@ class AdvancedSearchPopupView extends AbstractViewNext {
}
if (-1 < this.selectedDateValue()) {
let d = new Date(), pad2 = v => 10 > v ? '0' + v : v;
let d = new Date();
d.setDate(d.getDate() - this.selectedDateValue());
result.push('date:' + d.getFullYear()+'.'+pad2(d.getMonth()+1)+'.'+pad2(d.getDate()) + '/');
result.push('date:' + d.format('Y.m.d') + '/');
}
if (text) {