Skip to content

Commit 5e16ab5

Browse files
committed
chore: remove luxon
1 parent dfed691 commit 5e16ab5

3 files changed

Lines changed: 15 additions & 27 deletions

File tree

‎bun.lock‎

Lines changed: 9 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
"@praha/byethrow-mcp": "^0.1.0",
6767
"@ryoppippi/eslint-config": "^0.3.7",
6868
"@types/bun": "^1.2.19",
69-
"@types/luxon": "^3.7.1",
7069
"@typescript/native-preview": "^7.0.0-dev.20250727.1",
7170
"ansi-escapes": "^7.0.0",
7271
"bumpp": "^10.2.0",
@@ -81,7 +80,6 @@
8180
"gunshi": "^0.26.3",
8281
"hono": "^4.8.9",
8382
"lint-staged": "^16.1.2",
84-
"luxon": "^3.7.1",
8583
"path-type": "^6.0.0",
8684
"picocolors": "^1.1.1",
8785
"pretty-ms": "^9.2.0",

‎src/data-loader.ts‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { Result } from '@praha/byethrow';
2727
import { groupBy, uniq } from 'es-toolkit'; // TODO: after node20 is deprecated, switch to native Object.groupBy
2828
import { sort } from 'fast-sort';
2929
import { createFixture } from 'fs-fixture';
30-
import { DateTime } from 'luxon';
3130
import { isDirectorySync } from 'path-type';
3231
import { glob } from 'tinyglobby';
3332
import { z } from 'zod';
@@ -1104,13 +1103,12 @@ export async function loadMonthlyUsageData(
11041103
*/
11051104
function getDateWeek(date: Date): WeeklyDate {
11061105
// Anthropic is rolling this out on August 28, 2025. We're assuming that's when the
1107-
// weekly window is starting. Using Luxon here allows the code to easily account for
1108-
// Pacific time with daylight savings when necessary, since it's assumed based on
1109-
// what could be found online that Anthropic uses PDT for their time as well.
1110-
const startOfWeek = DateTime.fromObject(
1111-
{ year: 2025, month: 8, day: 28 },
1112-
{ zone: 'America/Los_Angeles' },
1113-
).toJSDate().getDay();
1106+
// weekly window is starting. August 28, 2025 is a Thursday in Pacific Time.
1107+
// This implementation uses native JavaScript Date to handle Pacific Time.
1108+
// Note: August 28, 2025 would be in PDT (UTC-7).
1109+
const referenceDate = new Date('2025-08-28T00:00:00-07:00');
1110+
const startOfWeek = referenceDate.getDay(); // Thursday = 4
1111+
11141112
const d = new Date(date);
11151113
const day = d.getDay();
11161114
const shift = (day - startOfWeek + 7) % 7;

0 commit comments

Comments
 (0)