Skip to content
New issue

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

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

Already on GitHub? # to your account

[PLAY-986] dateTime Rounding Bug #2728

Merged
merged 6 commits into from
Sep 12, 2023
Merged

[PLAY-986] dateTime Rounding Bug #2728

merged 6 commits into from
Sep 12, 2023

Conversation

gavhuang
Copy link
Contributor

@gavhuang gavhuang commented Sep 6, 2023

What does this PR do?

  • Runway
  • Fixes the timestamps with ranges inspired by Moment

Details:

  • Years are now calculated by taking the current year minus the year of the date passed in. This will get the desired behavior.
    • For example: 12/31/21 is not quite 2 years from 9/6/23, but we want it to read as 2 years ago
    • Months are handled in a similar way
  • Variable names are named based on their rounding
    • For example: TWENTY_SIX_DAYS = 25.5 days, which rounded up is 26 days and displays a month ago

How to test? Steps to confirm the desired behavior:

  1. Go to the Timestamp kit docs and any instance of it in Nitro
  2. Confirm the timestamp is correct

Checklist:

  • LABELS Add a label: enhancement, bug, improvement, new kit, deprecated, or breaking. See Changelog & Labels for details.
  • DEPLOY I have added the milano label to show I'm ready for a review.
  • TESTS I have added test coverage to my code.

@gavhuang gavhuang added bug Fixes to issues discovered in Playbook (USED IN CHANGELOG) milano 20 MAX - Deploy this PR to a review environment via Milano labels Sep 6, 2023
@gavhuang gavhuang self-assigned this Sep 6, 2023
@app-milano app-milano bot temporarily deployed to pr2728 September 6, 2023 02:03 Inactive
@app-milano app-milano bot temporarily deployed to pr2728 September 6, 2023 02:27 Inactive
@gavhuang gavhuang changed the title [PLAY-986] Fix timestamps [PLAY-986] dateTime Rounding Bug Sep 6, 2023
@app-milano app-milano bot temporarily deployed to pr2728 September 6, 2023 03:30 Inactive
@gavhuang gavhuang added the alpha label Sep 6, 2023
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

🎉 Congratulations on creating an Alpha Version!

Your Alpha for Ruby Gems is 13.2.0.pre.alpha.PLAY986dateTimeRounding1150

Your Alpha for NPM is 13.2.0-alpha.PLAY986dateTimeRounding1150

@gavhuang gavhuang marked this pull request as ready for review September 6, 2023 16:17
@gavhuang gavhuang requested a review from a team as a code owner September 6, 2023 16:17
@app-milano app-milano bot temporarily deployed to pr2728 September 6, 2023 16:24 Inactive
@app-milano app-milano bot temporarily deployed to pr2728 September 6, 2023 18:17 Inactive
@nidaqg nidaqg added the Ready for Release merged to master, ready for a versioned released label Sep 8, 2023
@nidaqg nidaqg added this pull request to the merge queue Sep 12, 2023
Merged via the queue into master with commit 7e04fa8 Sep 12, 2023
@nidaqg nidaqg deleted the PLAY-986-dateTime-Rounding branch September 12, 2023 15:35
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
alpha bug Fixes to issues discovered in Playbook (USED IN CHANGELOG) milano 20 MAX - Deploy this PR to a review environment via Milano Ready for Release merged to master, ready for a versioned released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants