@@ -27,7 +27,6 @@ import { Result } from '@praha/byethrow';
2727import { groupBy , uniq } from 'es-toolkit' ; // TODO: after node20 is deprecated, switch to native Object.groupBy
2828import { sort } from 'fast-sort' ;
2929import { createFixture } from 'fs-fixture' ;
30- import { DateTime } from 'luxon' ;
3130import { isDirectorySync } from 'path-type' ;
3231import { glob } from 'tinyglobby' ;
3332import { z } from 'zod' ;
@@ -1104,13 +1103,12 @@ export async function loadMonthlyUsageData(
11041103 */
11051104function 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