Last active
August 2, 2024 00:00
-
-
Save abdihaikal/09ce1fca216ab21f3a02095073cfe3b3 to your computer and use it in GitHub Desktop.
Get days in a month using Javascript
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
const getDaysInMonth = (yearValue: number, monthValue: number): number => { | |
return new Date(yearValue, monthValue, 0).getDate() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment