MCPcopy Create free account
hub / github.com/experdot/pointer / formatDateTime

Function formatDateTime

src/renderer/src/services/thirdPartyImportService.ts:28–31  ·  view source on GitHub ↗

* 格式化日期时间

(date: Date)

Source from the content-addressed store, hash-verified

26 * 格式化日期时间
27 */
28function 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 * 创建带时间戳的导入文件夹

Callers 1

createPlatformFolderFunction · 0.85

Calls 1

padFunction · 0.85

Tested by

no test coverage detected