add toShortTime
This commit is contained in:
@@ -2,6 +2,12 @@ import { describe, expect, it } from "vitest";
|
||||
import Time from "./Time";
|
||||
|
||||
describe("Time", () => {
|
||||
describe("toShortTime", () => {
|
||||
it("test toShortTime", () => {
|
||||
const date = new Date("2027-01-03T04:05:06.789Z");
|
||||
expect(Time.toShortTime(date.getTime())).toBe("05:06");
|
||||
});
|
||||
});
|
||||
describe("between", () => {
|
||||
it("should return time segments between begin and end", () => {
|
||||
const begin = new Date("2026-01-01T00:00:00.000Z");
|
||||
|
||||
Reference in New Issue
Block a user