Skip to content
JavaScript학습 기록

JavaScript project assignment MISSION 4❗: a calendar built with Date()

1 min readLearningMoved from my Tistory blogRead the Korean original

I'd like to write down some thoughts from coding JavaScript project assignment MISSION 4.

This assignment came with no template, so everything from the font import to the icon import was up to me.

Before building the calendar, I really had no idea where to start, so I looked through several blogs and YouTube videos and finished it through search after search. Maybe this kind of learning was the point?

First, I wrote the HTML, applied the CSS, and finished the JS, then changed the calendar from flex to grid. At first I didn't understand the requirement to make it responsive, but since I had set the grid to 1fr, it did shrink automatically with the width, so I wrapped it up as it was.

Next, this assignment taught me a lot about Date(), and I think I used the methods below the most.

Date.prototype.getDate()

Returns the day of the month (1 to 31) for the Date, in local time.

Date.prototype.getDay()

Returns the day of the week (0 to 6) for the Date, in local time.

Date.prototype.getFullYear()

Returns the year for the Date in local time (four digits for a four-digit year).

I'm also attaching a link to the blog I referred to while coding.

https://hianna.tistory.com/329

[Javascript] Calculating the last day of a month

The last assignment is infinite scroll, which we already did in the lectures, so I'm not too worried, but I'll work hard on it!

  • #JavaScript project assignment MISSION 3❗

More in Learning