Soooooooo TIL that months in JavaScript are 0 indexed so if you are trying to print out a date string you need to do + 1 to the .getMonth() HOW HAVE I NEVER ENCOUNTERED THIS BEFORE
-
-
Also: const month = date.getMonth() // highly misleading variable name const monthIndex = date.getMonth() // a little safer
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
The day of the month isn’t 0 indexed tho?

-
it is not
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.