Skip to content

Commit ddda624

Browse files
committed
feat: improve date formatting helper to return local timezone date string
1 parent 9188d3b commit ddda624

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

app/components/InterviewScheduleSidebar.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ const selectedTemplateName = computed(() => {
5151
})
5252
5353
// Set a sensible default title
54-
// Helper to extract YYYY-MM-DD from a Date object
54+
// Helper to extract YYYY-MM-DD from a Date object in local timezone
5555
function toDateString(d: Date): string {
56-
return d.toISOString().slice(0, 10)
56+
const year = d.getFullYear()
57+
const month = String(d.getMonth() + 1).padStart(2, '0')
58+
const day = String(d.getDate()).padStart(2, '0')
59+
return `${year}-${month}-${day}`
5760
}
5861
5962
onMounted(() => {

0 commit comments

Comments
 (0)