angular/packages/common
Doug Parker 13f050d220 test: construct local Date objects to fix timezone flakiness
Replaced testing constructions of `Date` objects from `formatDate` tests from plain ISO strings over to 'new Date(year, month, date)'.

Instantiating 'new Date("2024-01-01")' parses the string strictly as UTC midnight ("2024-01-01T00:00:00.000Z"). When local operations execute (such as calculating `getThursdayThisIsoWeek` boundaries), the UTC date shifts relative to the executing machine's timezone. For example, in PST (GMT-8), that date translates exactly to 'December 31st 16:00:00', pushing week boundaries backwards.

By wrapping date constructs explicitly as 'new Date(2024, 0, 1)', it natively guarantees local midnight execution and prevents boundaries shifting on global CI Remote Build Execution (RBE) workers.

Example (from a machine in PST):

```javascript
> new Date('2024-01-01')
Sun Dec 31 2023 16:00:00 GMT-0800 (Pacific Standard Time)
> new Date(2024, 0, 1)
Mon Jan 01 2024 00:00:00 GMT-0800 (Pacific Standard Time)
```

(cherry picked from commit 61ee183fa7)
2026-03-26 18:34:13 +01:00
..
http Revert "refactor(http): Improves base64 encoding/decoding with feature detection (#67002)" 2026-03-04 17:19:14 +00:00
locales build: update aspect_rules_js to 3.0.2 2026-03-11 13:35:26 -07:00
src fix(common): avoid redundant image fetch on destroy with auto sizes 2026-03-19 15:21:20 -07:00
test test: construct local Date objects to fix timezone flakiness 2026-03-26 18:34:13 +01:00
testing refactor(core): Use the provided Document value rather than global in FakeNavigation 2026-01-08 13:28:18 -08:00
upgrade build: update Jasmine to 6.0.0 2026-02-09 12:15:57 -08:00
BUILD.bazel build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
index.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
package.json build: update common's locales to use rules_js (#61629) 2025-05-26 10:18:14 +00:00
PACKAGE.md build: format md files 2025-11-06 10:03:05 -08:00
public_api.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00