Skip to content

feat(datetime): add hourCycle property #23686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 10, 2021
Merged

feat(datetime): add hourCycle property #23686

merged 8 commits into from
Aug 10, 2021

Conversation

EinfachHans
Copy link
Contributor

@EinfachHans EinfachHans commented Jul 26, 2021

resolves #23661

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Currently the date-time uses the locale to check if it should use a 12 or 24 hour format

Issue Number: #23661

What is the new behavior?

  • timeFormat prop added which could be '12h' or '24h' (or undefined)
  • If set: Use this format
  • if not set: Use locale like before

Does this introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions bot added package: angular @ionic/angular package package: core @ionic/core package package: vue @ionic/vue package labels Jul 26, 2021
@EinfachHans EinfachHans changed the title feat(datetime): add timeLabel prop feat(datetime): add timeFormat prop Jul 26, 2021
@liamdebeasi liamdebeasi requested review from willmartian and liamdebeasi and removed request for willmartian July 26, 2021 13:41
Copy link
Contributor

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! This is a great start. I would like to see this PR move more in line with what the JavaScript internationalization APIs use so that the API is more future proof. I left changes below which are required to merge this PR.

Please let me know if you have any questions about anything I wrote.

@EinfachHans
Copy link
Contributor Author

Requested Changes pushed, i think if you want to have some specific docs and explanation here it would be easier if you directly push into this pr or give me the text as i'm not the best in writing understandable docs in english 😃

@EinfachHans EinfachHans changed the title feat(datetime): add timeFormat prop feat(datetime): add hourCycle prop Jul 26, 2021
@EinfachHans EinfachHans requested a review from liamdebeasi July 26, 2021 19:22
Copy link
Contributor

@willmartian willmartian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice work on this PR.

@liamdebeasi liamdebeasi changed the title feat(datetime): add hourCycle prop feat(datetime): add hourCycle property Aug 10, 2021
Copy link
Contributor

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@liamdebeasi liamdebeasi merged commit 6342fde into ionic-team:next Aug 10, 2021
@liamdebeasi
Copy link
Contributor

Merged. Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: angular @ionic/angular package package: core @ionic/core package package: vue @ionic/vue package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants