Skip to content

Conversation

@Hyunuk-Lee
Copy link

Feature: useTodayDate 구현

Copy link

@Soi-coding Soi-coding left a comment

Choose a reason for hiding this comment

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

과제 하시느라 수고많으셨습니다!

const start = new Date(`${year}-01-01`);
const end = new Date(`${year + 1}-01-01`);
const progress =
((today.getTime() - start.getTime()) / (end.getTime() - start.getTime())) * 100;

Choose a reason for hiding this comment

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

올해가 얼마나 지났는지 계산하기 위한 코드를 잘 작성해주신 것 같아요!

<h2>useSomething 실습</h2>
<h2>오늘의 날짜와 올해 경과율</h2>
<p>오늘은 {formattedDate}입니다.</p>
<p>이번 년도의 {progressPercent}%가 지났습니다.</p>

Choose a reason for hiding this comment

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

많은 사람들이 흥미롭게 생각할 만한 주제인 것 같아요!

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.

4 participants