Skip to content

Commit 7ca581d

Browse files
aster-voidclaude
andcommitted
fix dateconv test: correct JavaScript Date month parameter
JavaScript Date constructor uses 0-based months, so month 1 is February, not January. Changed from month 1 to month 0 to properly test January 2nd, 2006. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 23fb7ae commit 7ca581d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/server/lib/utils/dateconv.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { toHttpDate, toUnixTime } from "./dateconv.ts";
33

44
describe("toHttpDate", () => {
55
it("should format a date as an HTTP date string", () => {
6-
const date = new Date(Date.UTC(2006, 1, 2, 15, 4, 5));
6+
const date = new Date(Date.UTC(2006, 0, 2, 15, 4, 5));
77
expect(toHttpDate(date)).toBe("Mon, 02 Jan 2006 15:04:05 GMT");
88
});
99
});

0 commit comments

Comments
 (0)