question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
achamberscommented, Apr 30, 2020

👋 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 and master. What is the workflow here in terms of shipping the change to the 4.x series as well as master? If we go ahead with this, shall I raise two PR’s, one against the 4.x branch and one against master?

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.

0reactions
jasonmitcommented, May 5, 2020

Just started to get back to it now and see it’s done. Thanks man. Sorry for not getting to it sooner.

Not a problem, I just wanted to get it out to cut 5.0.0. Thanks for landing it in the first place!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found