* 格式化日期时间
(date: Date)
| 26 | * 格式化日期时间 |
| 27 | */ |
| 28 | function formatDateTime(date: Date): string { |
| 29 | const pad = (n: number): string => n.toString().padStart(2, '0') |
| 30 | return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}` |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * 创建带时间戳的导入文件夹 |
no test coverage detected