diff --git a/app/hooks/useFormattedDate.ts b/app/hooks/useFormattedDate.ts index bfa7ef3..5930ef2 100644 --- a/app/hooks/useFormattedDate.ts +++ b/app/hooks/useFormattedDate.ts @@ -1,4 +1,6 @@ export function useFormattedDate(_date: string) { - const date = new Date(_date) - return `${date.getUTCFullYear()}/${date.getUTCMonth()}/${date.getUTCDate()}` + const date = new Date(_date); + const month = date.getUTCMonth().toString().padStart(2, "0"); + const monthDate = date.getUTCDate().toString().padStart(2, "0"); + return `${date.getUTCFullYear()}/${month}/${monthDate}`; }