Skip to content

Commit

Permalink
[fix]今月を正しく出力する
Browse files Browse the repository at this point in the history
  • Loading branch information
Kubosaka committed Aug 11, 2024
1 parent 88bbe17 commit 3692c33
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ const UplaodFileModal: FC<ModalProps> = (props) => {

// 日付取得
const date = new Date();
const month = date.getMonth() < 10 ? '0' + date.getMonth() : date.getMonth();
const thisMonth = date.getMonth() + 1;
const month = thisMonth < 10 ? '0' + thisMonth : thisMonth;
const day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
const formattedDate = `${date.getFullYear()}${month}${day}`;
const randomStr = generateRandomString();
Expand Down

0 comments on commit 3692c33

Please sign in to comment.