Files
ragflow_python/web/src/utils/date.ts
balibabu af3ef26977 feat: layout the knowledge list page and modify the page switching button in the header (#48)
* feat: remove unnecessary 'loading' fields from other files

* feat: layout the knowledge list page

* feat: modify the page switching button in the header
2024-01-31 19:29:57 +08:00

21 lines
396 B
TypeScript

import moment from 'moment';
export function today() {
return formatDate(moment());
}
export function lastDay() {
return formatDate(moment().subtract(1, 'days'));
}
export function lastWeek() {
return formatDate(moment().subtract(1, 'weeks'));
}
export function formatDate(date: any) {
if (!date) {
return '';
}
return moment(date).format('DD/MM/YYYY');
}