Skip to content
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

Refactor formats #227

Merged
merged 22 commits into from
Dec 8, 2022
Merged

Refactor formats #227

merged 22 commits into from
Dec 8, 2022

Conversation

keithamus
Copy link
Member

Much like #226 this refactors and cleans up the internals to use Duration for relative style dates. This uses the same rounding rules as the micro format, which makes the two formats much more consistent.

A few tests have changed around the display of dates; similar to #226 we're rounding weeks now, and years get displayed instead of odd rounding like 12 months ago, 17 months ago.

This PR also lays the groundwork for #220 - which should now be a relatively easy change.

@keithamus keithamus requested a review from a team as a code owner December 8, 2022 16:26
@primer-css
Copy link

👋 Hello and thanks for pinging us! This issue or PR has been added to our inbox and a Design Infrastructure first responder will review it soon.

  • 🎨 If this is a PR that includes a visual change, please make sure to add screenshots in the description or deploy this code to a lab machine with instructions for how to test.
  • If this is a PR that includes changes to an interaction, please include a video recording in the description.
  • ⚠️ If this is urgent, please visit us in #primer on Slack and tag the first responders listed in the channel topic.

Copy link

@joshblack joshblack left a comment

Choose a reason for hiding this comment

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

Looks great! 🎉

@keithamus keithamus merged commit 567b087 into main Dec 8, 2022
@keithamus keithamus deleted the refactor-formats branch April 18, 2023 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants