优化代码

This commit is contained in:
none
2023-03-23 13:56:14 +08:00
parent f84f192d4b
commit aa3115dca0
4 changed files with 16 additions and 22 deletions

View File

@@ -1,4 +1,3 @@
import { assert } from "console";
import moment from "moment";
import { VideoParseInfo } from "../types";
@@ -31,7 +30,7 @@ export function timeFormat(dateStr: number) {
"秒";
if (Math.floor(d.asDays()) === 0) {
if (d.hours() == 0) {
if (d.hours() === 0) {
value = d.minutes() + "分" + d.seconds() + "秒";
} else {
value = d.hours() + "时" + d.minutes() + "分" + d.seconds() + "秒";