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

Show leading zeros on minutes in shared link expiration display #393

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

kdid
Copy link
Contributor

@kdid kdid commented Dec 12, 2024

  • Shared links are currently displaying minutes in the expiration without leading zeroes.
  • This update will now display, for example: 1:06pm instead of 1:6pm

Steps to Test

  • create a shared link in Meadow when the minute is a single digit
  • view the shared link in DC and verify correct display of expiration time

@kdid kdid self-assigned this Dec 12, 2024
@kdid kdid requested a review from mathewjordan December 12, 2024 22:11
Copy link
Member

@mathewjordan mathewjordan left a comment

Choose a reason for hiding this comment

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

I think timezone might be an issue now (or always was). See my comment below:

describe("formatDateLong", () => {
test("should format date correctly in long format", () => {
const result = formatDateLong("2023-11-14T13:14:00Z");
expect(result).toBe("November 14, 2023, 1:14pm");
Copy link
Member

Choose a reason for hiding this comment

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

I'm getting:

formatDateLong › should format date correctly in long format

    expect(received).toBe(expected) // Object.is equality

    Expected: "November 14, 2023, 1:14pm"
    Received: "November 14, 2023, **8:14am"**

I think this might be related timezones and the Z in the date. Not sure how to best proceed here but I'm happy to sit with you to figure out your local tests.

Copy link
Member

Choose a reason for hiding this comment

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

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mathewjordan - updated to account for local time zones. The test is a little wonky but hopefully good enough.

@kdid kdid force-pushed the 5327-minutes-zero branch 4 times, most recently from d926600 to 83ec6cc Compare December 13, 2024 19:09
@kdid kdid force-pushed the 5327-minutes-zero branch from 83ec6cc to bbb72d1 Compare December 13, 2024 19:18
@kdid
Copy link
Contributor Author

kdid commented Dec 18, 2024

@mathewjordan - this is ready for a re-review.

Copy link
Member

@mathewjordan mathewjordan left a comment

Choose a reason for hiding this comment

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

👍

@kdid kdid merged commit 7162dd6 into deploy/staging Dec 19, 2024
3 checks passed
@kdid kdid deleted the 5327-minutes-zero branch December 19, 2024 15:29
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.

2 participants