YARA-1258

This commit is contained in:
SepehrYahyaee
2026-09-12 14:23:23 +03:30
parent 9e51fdcdaf
commit 7fd60df1d6
5 changed files with 300 additions and 21 deletions
+17
View File
@@ -0,0 +1,17 @@
import { toJalaliDateAndTime } from "./date-jalali";
describe("toJalaliDateAndTime", () => {
it("always formats timestamps in Asia/Tehran regardless of server timezone", () => {
expect(toJalaliDateAndTime("2026-08-10T12:30:45.000Z")).toEqual([
"1405/05/19",
"16:00",
]);
});
it("uses the Tehran calendar day when UTC and Tehran dates differ", () => {
expect(toJalaliDateAndTime("2026-08-10T21:30:00.000Z")).toEqual([
"1405/05/20",
"01:00",
]);
});
});