Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Date pipe time component extraction issues across locales #12632
I'm submitting a ... (check one with "x")
I've provided unit tests as a repro- the expected results are valid on Chrome, but not necessarily IE - (different browsers format locales differently, including the order of components, number system and alphabets used.) See the full tests created while investigating the issue at https://gist.github.com/gary-b/bdc67fae4767c7da08ee93965a955fa5
assume date = new Date(2015, 5, 15, 9, 3, 1);
See the Intl.ts hourClockExtractor function.
2.The 2 digit formatting (eg "hh") outputs a mix of numbering systems
The '0' is hard coded into angular's Intl.js digitModifier function.
3.The timezone output fails with certain locales
See the Intl.ts timeZoneGetter function.
4.The era output doesn't work on any locale I tried
Angular's Intl.ts assumes the Intl.DateTimeFormat object will output the era on its own, it doesn't.
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
@gary-b thnx for the super-detailed summary issues. Indeed the current handling of custom formats needs much more love and your list helps us making things better! Thank you.
@DzmitryShylovich I'm going to keep this one open as it is very detailed and valuable. We need to make sure that all the use-cases here are turned into tests and those tests are run as part of CI on each and every supported browser.
referenced this issue
Dec 12, 2016
Hello, most of these issues will be fixed with the PR to replace the intl API for angular v5 (see #10809)