#TIL: In #JavaScript, constructing a date with a string uses a different timezone than with numbers.

```
> 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)
```

https://github.com/angular/angular/pull/67845/changes/732f85c188cbb38e95d0e5a223bdafaea2a59547

Fix flakey `formatDate` tests by dgp1130 · Pull Request #67845 · angular/angular

Mostly generated by Gemini, fixing some flakey tests which were accidentally using device local time, which can vary for Bazel tests based on the location of RBE instances.

GitHub