Skip to content

2768 fix date format archived accounts page#2911

Merged
entrotech merged 4 commits into
developfrom
2768-fix-date-format-archived-accounts-page
Feb 26, 2026
Merged

2768 fix date format archived accounts page#2911
entrotech merged 4 commits into
developfrom
2768-fix-date-format-archived-accounts-page

Conversation

@Philc90

@Philc90 Philc90 commented Feb 19, 2026

Copy link
Copy Markdown
Member

What changes did you make?

  • Archived Accounts page: update Date Archived to YYYY-MM-DD format

Why did you make the changes (we will use this info to test)?

  • update displayed "Date Archived" date to conform to ISO Standard

Issue-Specific User Account

If you registered a new, temporary TDM User Account for this issue, indicate the
username (i.e., email address) for the account.

Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)

Visuals before changes are applied 2768-before
Visuals after changes are applied 2768-after

@Philc90

Philc90 commented Feb 19, 2026

Copy link
Copy Markdown
Member Author

@entrotech Note for review: I used the formatDate util function to format the date, however it doesn't convert the date to the user's local time zone

Example:
raw datetime value (UTC): 2025-12-05T04:20:30.093Z
before changes (toLocaleDateString): 12/4/2025
after changes (formatDate from util.js): 2025-12-05

In util.js, there is also a formatDatetime function which will convert the time zone, but it will also display the hours/minutes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for catching the problem with missing Time Zone conversions for formatDate. As you pointed out, the formatDate function need to do a time zone conversion. In addition, these functions were confusing to use because the formatDate function only worked property when you gave it a JavaScript date, and the formatDatetime function only worked when you gave an ISO formatted date string. We kind of need to use both date representation in the app in different places - ISO strings are ok for display, sorting and comparison, but there are places where we actually need to do arithmetic with Javascript dates. So I modified the utility functions to handle both representations, and added comments to explicitly explain the acceptable input formats, and added the commit to your PR.

Good work!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Great, thank you for the review!

@entrotech entrotech left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good work. I reviewed the formatDate and formatDatetime functions and modified them to make sure both do a time zone conversion to Pacific Time and can work with javascript dates or ISO date strings as inputs.

@entrotech
entrotech merged commit 13b9ff0 into develop Feb 26, 2026
7 checks passed
@entrotech
entrotech deleted the 2768-fix-date-format-archived-accounts-page branch February 26, 2026 01:11
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.

Dev: Fix date format on Archived Accounts page

2 participants