调试接口
This commit is contained in:
@ -147,3 +147,14 @@ export function randomLabelColor (index: number) {
|
||||
return tagColors[index % tagColors.length]
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前年月日,格式:YYYY-MM-DD
|
||||
*/
|
||||
export function getCurrentDate() {
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = String(now.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(now.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user