import { describe, expect, it } from "vitest"; import { persianDate } from "./blogDates"; describe("persianDate", () => { it("uses the Persian calendar and Asia/Tehran at a UTC near-midnight boundary", () => { const value = "2026-03-20T21:00:00.000Z"; const expected = new Intl.DateTimeFormat("fa-IR-u-ca-persian", { year: "numeric", month: "numeric", day: "numeric", timeZone: "Asia/Tehran", }).format(new Date(value)); expect(persianDate(value)).toBe(expected); }); });