Created
April 23, 2022 07:21
-
-
Save yusufneeson/23909737e5c3a0f0bd0ac15e1719031b to your computer and use it in GitHub Desktop.
Loop Day In Month Through Div Box
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Array(TOTAL_DATE).fill().forEach((_, i) => { | |
| const date = new Date(new Date().getFullYear(), new Date().getMonth(), i + 1) | |
| const day = date.getDate() | |
| const month = date.toLocaleString('default', { month: 'long' }) | |
| const year = date.getFullYear() | |
| const dateString = `${day} ${month} ${year}` | |
| $('#date-box').append(`<div class="date-box-item">${dateString}</div>`) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment