1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

All: Resolves #1877: Add search filters (#3213)

This commit is contained in:
Naveen M V
2020-08-08 04:43:21 +05:30
committed by GitHub
parent 3253146dae
commit f99f3f8a6d
27 changed files with 1715 additions and 88 deletions

View File

@ -111,6 +111,17 @@ class Time {
sleep(seconds) {
return this.msleep(seconds * 1000);
}
goBackInTime(startDate, n, period) {
// period is a string (eg. "day", "week", "month", "year" ), n is an integer
return moment(startDate).startOf(period).subtract(n, period).format('x');
}
goForwardInTime(startDate, n, period) {
return moment(startDate).startOf(period).add(n, period).format('x');
}
}
const time = new Time();