Skip to content

C13/14#366

Open
irizarrymateo2005 wants to merge 1 commit into
mainfrom
C13/14
Open

C13/14#366
irizarrymateo2005 wants to merge 1 commit into
mainfrom
C13/14

Conversation

@irizarrymateo2005

Copy link
Copy Markdown
Collaborator

No description provided.

@irizarrymateo2005 irizarrymateo2005 self-assigned this Jun 9, 2026
return formatYmdLocal(parsed)
}

//if the value is an ISO string, extract just the "YYYY-MM-DD" portion to avoid timezone shift

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

^^^^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>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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'}) }} •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same as previous comment

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