mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
core: add dateModified comparator
This commit is contained in:
@@ -24,6 +24,10 @@ const MILLISECONDS_IN_DAY = 1000 * 60 * 60 * 24;
|
||||
const MILLISECONDS_IN_WEEK = MILLISECONDS_IN_DAY * 7;
|
||||
|
||||
const comparators = {
|
||||
dateModified: {
|
||||
asc: (a, b) => a.dateModified - b.dateModified,
|
||||
desc: (a, b) => b.dateModified - a.dateModified
|
||||
},
|
||||
dateEdited: {
|
||||
asc: (a, b) => a.dateEdited - b.dateEdited,
|
||||
desc: (a, b) => b.dateEdited - a.dateEdited
|
||||
|
||||
Reference in New Issue
Block a user