Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add test cases for superfluous days#263

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
TymekDev wants to merge4 commits intogithub:main
base:main
Choose a base branch
Loading
fromTymekDev:main

Conversation

TymekDev
Copy link

This PR adds cases for whole years and whole months to not have extra days, e.g. May (2023-05-11T00:00:00.00) to July (2023-07-11T00:00:00.00) being2 months instead of current2 months, 1 day.

Related issue:#262

@TymekDevTymekDev requested a review froma team as acode ownerJuly 11, 2023 20:53
@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 avideo 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.

@lukasoppermann
Copy link

I'd love for@keithamus to approve this as he is working on it. Fine from primer FR side

@keithamus
Copy link
Contributor

Thanks, I'm looking into fixing this but I have higher priorities for now. A fix will come though!

@keithamuskeithamus self-assigned thisAug 21, 2023
@keithamuskeithamus requested review fromjoshblack and removed request forkeithamusNovember 18, 2024 17:28
@joshblack
Copy link
Contributor

Sorry for the delay on my end, adding this to the first responder board to pick up 👀@keithamus just wanted to check-in, what are the next steps for this?

@camertron
Copy link
Contributor

I looked into this today and have become thoroughly confused. Are you specifying anyprecision argument anywhere?

If I try copy/pasting your test cases into example/index.html, it always gives me something like "1 year, 6 days, 4 minutes, 24 seconds." I don't understand why the tests fail the way they do when noprecision is specified.

@TymekDev
Copy link
Author

@camertron according to the README the precision defaults tosecond, so I'd assume that's how it works. I don't think it changes anything in this context, though.

I just put this into an HTML (using v4.4.4 via npm):

<relative-timeformat="duration"datetime="1944-12-13"></relative-time>

It showed "81 years, 2 months, 22 hours, 21 minutes, 45 seconds" for me. Even if I set the precision as high asyear, then that would still be wrong—it should be 80 years. In other words, given a long enough duration, all precision levels are affected.

@joshblackjoshblack removed their request for reviewJanuary 10, 2025 19:15
@keithamuskeithamus removed their assignmentFeb 17, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@TymekDev@primer-css@lukasoppermann@keithamus@joshblack@camertron

[8]ページ先頭

©2009-2025 Movatter.jp