mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 16:02:14 +00:00
frontend use exact time in every case
This commit is contained in:
@@ -114,7 +114,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-white grid grid-cols-2 gap-x-2 col-span-2">
|
||||
<div class="w-full text-gray-500 text-xs text-left flex flex-col gap-1 mx-4">
|
||||
<div class="w-full text-gray-500 text-xs text-left flex flex-col gap-1 mx-4 overflow-hidden">
|
||||
<div>
|
||||
<Icon class="text-gray-700" data={faUser} scale={SMALL_ICON_SCALE} /><span class="mx-2">
|
||||
By {job.created_by}</span
|
||||
|
||||
@@ -43,8 +43,10 @@ export function displayDaysAgo(dateString: string): string {
|
||||
let dAgo = daysAgo(date)
|
||||
if (dAgo == 0) {
|
||||
return `yday at ${date.toLocaleTimeString()}`
|
||||
} else if (dAgo > 7) {
|
||||
return `${dAgo + 1} days ago at ${date.toLocaleTimeString()}`
|
||||
} else {
|
||||
return `${dAgo + 1} days ago`
|
||||
return displayDate(dateString)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,9 +56,8 @@ export function displayDate(dateString: string | undefined): string {
|
||||
if (date.toString() === 'Invalid Date') {
|
||||
return ''
|
||||
} else {
|
||||
return `${date.getFullYear()}/${
|
||||
date.getMonth() + 1
|
||||
}/${date.getDate()} at ${date.toLocaleTimeString()}`
|
||||
return `${date.getFullYear()}/${date.getMonth() + 1
|
||||
}/${date.getDate()} at ${date.toLocaleTimeString()}`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user