Created
July 17, 2025 01:12
-
-
Save luizbills/fe5f9cee402fb68c5112118c722bad3b to your computer and use it in GitHub Desktop.
Get the date in YYYY-MM-DD format
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 date = () => { | |
const offset = (new Date()).getTimezoneOffset() | |
return new Date(Date.now() - (offset*60*1000)).toISOString().split('T')[0] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment