Constructing dates with new Date(dateKey + "T00:00:00") relies on the browser’s interpretation of a date‑time string without a timezone.This can cause off‑by‑one errors near DST transitions or for users in different time zones.
id like to fix this by,using UTC methods (Date.UTC) or a library like date-fns to consistently handle dates. At minimum, ensure all comparisons use the same method and are tested across time zones.
Constructing dates with new Date(dateKey + "T00:00:00") relies on the browser’s interpretation of a date‑time string without a timezone.This can cause off‑by‑one errors near DST transitions or for users in different time zones.
id like to fix this by,using UTC methods (Date.UTC) or a library like date-fns to consistently handle dates. At minimum, ensure all comparisons use the same method and are tested across time zones.