forked from DebaucheryLibrarian/traxxx
Improved 'new' sorting.
This commit is contained in:
@@ -2,23 +2,23 @@ import dayjs from 'dayjs';
|
||||
|
||||
const dateRanges = {
|
||||
latest: () => ({
|
||||
after: '1900-01-01',
|
||||
before: dayjs(new Date()).add(1, 'day').format('YYYY-MM-DD'),
|
||||
after: '1900-01-01 00:00:00',
|
||||
before: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
orderBy: 'DATE_DESC',
|
||||
}),
|
||||
upcoming: () => ({
|
||||
after: dayjs(new Date()).format('YYYY-MM-DD'),
|
||||
before: '2100-01-01',
|
||||
after: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
before: '2100-01-01 00:00:00',
|
||||
orderBy: 'DATE_ASC',
|
||||
}),
|
||||
new: () => ({
|
||||
after: '1900-01-01',
|
||||
before: '2100-01-01',
|
||||
orderBy: 'CREATED_AT_DESC',
|
||||
after: '1900-01-01 00:00:00',
|
||||
before: '2100-01-01 00:00:00',
|
||||
orderBy: ['CREATED_AT_DESC', 'DATE_ASC'],
|
||||
}),
|
||||
all: () => ({
|
||||
after: '1900-01-01',
|
||||
before: '2100-01-01',
|
||||
after: '1900-01-01 00:00:00',
|
||||
before: '2100-01-01 00:00:00',
|
||||
orderBy: 'DATE_DESC',
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user