mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? feat: Show task_executor heartbeat #3409 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,5 +1,19 @@
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
export function formatDate(date: any) {
|
||||
if (!date) {
|
||||
return '';
|
||||
}
|
||||
return dayjs(date).format('DD/MM/YYYY HH:mm:ss');
|
||||
}
|
||||
|
||||
export function formatTime(date: any) {
|
||||
if (!date) {
|
||||
return '';
|
||||
}
|
||||
return dayjs(date).format('HH:mm:ss');
|
||||
}
|
||||
|
||||
export function today() {
|
||||
return formatDate(dayjs());
|
||||
}
|
||||
@ -11,10 +25,3 @@ export function lastDay() {
|
||||
export function lastWeek() {
|
||||
return formatDate(dayjs().subtract(1, 'weeks'));
|
||||
}
|
||||
|
||||
export function formatDate(date: any) {
|
||||
if (!date) {
|
||||
return '';
|
||||
}
|
||||
return dayjs(date).format('DD/MM/YYYY HH:mm:ss');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user