Skip to content

Commit b9d53b8

Browse files
committed
chore(utils): keep the offset comparison comment to its rationale
CLAUDE.md keeps change history in commit messages, so the comment only states why the offsets are compared instead of recounting the previous behaviour. Signed-off-by: laoyyu <laoyyu@foxmail.com>
1 parent f618e58 commit b9d53b8

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎packages/utils/src/formatting.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ export function getTimezoneAbbreviation(timezone: string, date: Date = new Date(
5757

5858
const zone = timezoneMap[timezone]
5959
if (zone) {
60-
// Compare the zone's UTC offsets across the year: `format()` always
61-
// includes the calendar date, so comparing formatted strings reported
62-
// "DST observed" for the whole year and then "daylight" for every date.
60+
// Compare UTC offsets because `format()` also includes the calendar date.
6361
const januaryOffset = getOffsetMinutes(timezone, new Date(date.getFullYear(), 0, 1))
6462
const julyOffset = getOffsetMinutes(timezone, new Date(date.getFullYear(), 6, 1))
6563

0 commit comments

Comments
 (0)