upper to timi-ts

This commit is contained in:
Timi
2026-08-28 15:18:46 +08:00
parent eef7a78fe9
commit cf62eb2d41
33 changed files with 143 additions and 1249 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import Time from "./Time";
import { Time } from "timi-ts";
describe("Time", () => {
describe("toShortTime", () => {
@@ -31,7 +31,7 @@ describe("Time", () => {
it("should format duration without milliseconds by default", () => {
const value = Time.D * 366 + Time.H * 2 + Time.M * 3 + Time.S * 4 + 567;
expect(Time.duration(value)).toBe("1 年 1 日 2 小时 3 分钟 4 秒");
expect(Time.duration(value)).toBe("1 年 1 天 2 小时 3 分钟 4 秒");
});
it("should include milliseconds when ms flag is true", () => {