Created
July 20, 2016 03:06
-
-
Save matkl/dfc3990ba489e59c168461e34e3ef6c0 to your computer and use it in GitHub Desktop.
Get first day of month in JavaScript
This file contains 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
export default function getFirstDateOfMonth() { | |
const now = new Date(); | |
return new Date(now.getFullYear(), now.getMonth()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment