mirror of
https://github.com/afoim/fuwari.git
synced 2026-01-31 09:03:18 +08:00
feat: 为文章发布时间添加精确到秒的时间戳
修改文章发布时间格式,从仅日期改为包含时分秒的完整时间戳 更新文章排序逻辑和新建文章脚本以支持精确时间排序
This commit is contained in:
@@ -8,8 +8,11 @@ function getDate() {
|
||||
const year = today.getFullYear()
|
||||
const month = String(today.getMonth() + 1).padStart(2, "0")
|
||||
const day = String(today.getDate()).padStart(2, "0")
|
||||
const hours = String(today.getHours()).padStart(2, "0")
|
||||
const minutes = String(today.getMinutes()).padStart(2, "0")
|
||||
const seconds = String(today.getSeconds()).padStart(2, "0")
|
||||
|
||||
return `${year}-${month}-${day}`
|
||||
return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}`
|
||||
}
|
||||
|
||||
const args = process.argv.slice(2)
|
||||
|
||||
Reference in New Issue
Block a user