chore(editor): adjust format of date time in slash menu (#12631)
Closes: #12624 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Updated the time formatting to display dates as "yyyy-mm-dd hh:mm" instead of "mm-dd hh:mm". <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -95,11 +95,8 @@ export function formatDate(date: Date) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function formatTime(date: Date) {
|
export function formatTime(date: Date) {
|
||||||
// mm-dd hh:mm
|
|
||||||
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
||||||
const day = date.getDate().toString().padStart(2, '0');
|
|
||||||
const hours = date.getHours().toString().padStart(2, '0');
|
const hours = date.getHours().toString().padStart(2, '0');
|
||||||
const minutes = date.getMinutes().toString().padStart(2, '0');
|
const minutes = date.getMinutes().toString().padStart(2, '0');
|
||||||
const strTime = `${month}-${day} ${hours}:${minutes}`;
|
const strTime = `${formatDate(date)} ${hours}:${minutes}`;
|
||||||
return strTime;
|
return strTime;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user