C13/14#366
Open
irizarrymateo2005 wants to merge 1 commit into
Open
Conversation
AidanLoran
requested changes
Jun 15, 2026
| return formatYmdLocal(parsed) | ||
| } | ||
|
|
||
| //if the value is an ISO string, extract just the "YYYY-MM-DD" portion to avoid timezone shift |
Collaborator
There was a problem hiding this comment.
Where is this even used?
| const { FormGroup } = useCurrentFormGroup() | ||
| const { tickets, completedFormIds, logFormSubmission, logSubmissionResponse } = useCurrentStudentProgress() | ||
|
|
||
| //parse a date string (ISO or YYYY-MM-DD) into a local-midnight Date to avoid timezone shift when displaying weekday/day of month |
Collaborator
There was a problem hiding this comment.
Can do this with cleaner with dayjs library. dayjs(date).format('YYYY-MM-DD').
Also, this function (with dayjs implemented) is already used in useAdmin from Swarna's incoming pr. It should be pulled from there. I'll make her extract the date logic to its own composable for clearer use across both reader and admin
Collaborator
There was a problem hiding this comment.
^^^^essentially, wait for date logic changed pr to be merged into main and then use those functions here
| > | ||
| <span class="text-[9px] uppercase leading-none">{{ new Date(form.startDate).toLocaleDateString('en-US', {weekday:'short'}) }}</span> | ||
| <span class="text-lg font-black leading-tight">{{ new Date(form.startDate).getDate() }}</span> | ||
| <span class="text-[9px] uppercase leading-none">{{ toLocalDate(form.startDate).toLocaleDateString('en-US', {weekday:'short'}) }}</span> |
Collaborator
There was a problem hiding this comment.
make sure to update the actual calls to the function once other work implemented
| <div class="flex items-center gap-2 mt-0.5"> | ||
| <p class="text-xs font-bold text-gray-400"> | ||
| {{ new Date(form.startDate).toLocaleDateString('en-US', {weekday:'long'}) }} • | ||
| {{ toLocalDate(form.startDate).toLocaleDateString('en-US', {weekday:'long'}) }} • |
Collaborator
There was a problem hiding this comment.
same as previous comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.