C13/14#366
Conversation
| return formatYmdLocal(parsed) | ||
| } | ||
|
|
||
| //if the value is an ISO string, extract just the "YYYY-MM-DD" portion to avoid timezone shift |
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 |
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
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> |
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'}) }} • |
There was a problem hiding this comment.
same as previous comment
|
waiting on h4 |
No description provided.