angular/packages/common/test
Stephen Hicks 74cceba587 feat(common): throw error for suspicious date patterns (#59798)
Adjusts the date pipe and formatDate function to detect suspicious usages of the week-numbering year formatter without including the week number, as this is often confused for the calendar year and likely to result in incorrect results near New Years, meaning that those issues aren't typically caught during development. This commit starts throwing a development-only error to reveal this issue right away.

BREAKING CHANGE:

Using the `Y` formatter (week-numbering year) without also including `w` (week number) is now detected as suspicious date pattern, as `y` is typically intended.

PR Close #59798
2025-02-24 17:15:03 -05:00
..
directives refactor(common): tree-shake PreloadLinkCreator for client bundles (#59431) 2025-01-24 17:17:58 +01:00
i18n feat(common): throw error for suspicious date patterns (#59798) 2025-02-24 17:15:03 -05:00
image_loaders feat(common): add optional rounded transform support in cloudinary image loader (#55364) 2024-10-23 07:59:13 -07:00
location refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
pipes refactor(common): remove standalone: true (#58949) 2024-12-04 12:41:51 +01:00
BUILD.bazel refactor: update packages/common tests to work with ESM pipeline (#48521) 2022-12-19 19:50:42 +00:00
cookie_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
viewport_scroller_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00