Add support for `hourCycle` date/time format option
See original GitHub issue- I am on the latest ember-intl version
- I have searched the issues of this repo and believe that this is not a duplicate
Environment
- Ember Version: 3.13.2
- Ember CLI Version: 3.16.0
- Ember Intl Version: 4.3.2
- Browser(s): Chrome 81.0.4044.122
- Node Version: 8.12.0
Steps to Reproduce
This is not a bug but a feature request. It’d be great if this addon supported the overriding of the hourCycle
property for date and time formatting LINK to docs.
To be clarified
- Is this change desired?
- Patch for
4.x
branch - Patch for
master
branch?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
1386146 - Add support for hourCycle to Intl.DateTimeFormat
This patch applies on your patch. It should fix the hour representation issue. Notable changes: - The hourCycle setting wasn't stored in the...
Read more >dateStyle and timeStyle options for DateTimeFormat - TC39
This proposal adds two options to Intl.DateTimeFormat : dateStyle and timeStyle . These options give a ... Let hourCycle be null . Set...
Read more >Intl.DateTimeFormat returns an hour over 24 - Stack Overflow
Adding the suggested hourCycle: h11 to my timeOptions did not work. Digging further, I found this page, which lists h23 as a valid...
Read more >Intl: DateTimeFormat - `options.hourCycle` parameter - CanIUse
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >Default hour-cycle computation can resolve to non-preferred ...
https://github.com/tc39/test262/blob/master/test/intl402/DateTimeFormat/prototype/resolvedOptions/hourCycle-default.js is currently failing ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
👋 Hi maintainers. Thanks for a great addon.
We have come across a scenario where we need the ability to set the
hourCycle
property when formatting times. It’s a simple change to this codebase but wanted to document it as an issue to find out what the etiquette is for contributing this sort of change.Firstly, is this something you’re open to exposing to users and adding to this addon?
If so, I have a PR ready to go (#1261), including updates to tests and docs.
I see the code of the format-date file has changed between the
4.x
branch andmaster
. What is the workflow here in terms of shipping the change to the4.x
series as well asmaster
? If we go ahead with this, shall I raise two PR’s, one against the4.x
branch and one againstmaster
?I’ll create the PR I have against
4.x
and link it to this issue for now, as a means of facilitating the discussion.Not a problem, I just wanted to get it out to cut 5.0.0. Thanks for landing it in the first place!