Skip to content

Commit

Permalink
[chore/#59]: date console
Browse files Browse the repository at this point in the history
  • Loading branch information
Kong-E committed Aug 28, 2024
1 parent a21c22a commit 6b5fb09
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/formatTimeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const formatTime = (time: number) => {

export const getCurrentDate = () => {
const today = new Date();
console.log('오늘: ', today);
const year = today.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, '0'); // 월은 0부터 시작하므로 +1 필요
const day = String(today.getDate() - (today.getHours() < 5 ? 1 : 0)).padStart(2, '0');
Expand Down

0 comments on commit 6b5fb09

Please sign in to comment.