change workflow run page to show stream with current task (#971)

Co-authored-by: Muhammed Salih Altun <muhammedsalihaltun@gmail.com>
This commit is contained in:
Shuchang Zheng
2024-10-14 13:07:54 -07:00
committed by GitHub
parent 33c0a5af55
commit dcca1a64d2
3 changed files with 171 additions and 75 deletions

View File

@@ -10,4 +10,12 @@ function basicTimeFormat(time: string): string {
return `${dateString} at ${timeString}`;
}
export { basicTimeFormat };
function timeFormatWithShortDate(time: string): string {
const date = new Date(time);
const dateString =
date.getMonth() + 1 + "/" + date.getDate() + "/" + date.getFullYear();
const timeString = date.toLocaleTimeString("en-US");
return `${dateString} at ${timeString}`;
}
export { basicTimeFormat, timeFormatWithShortDate };