Strange. Maybe it's the way you do new Date(Date.now()) rather than just new Date() - I guess it could also be a bracketing thing.
Also, the values returned for getMonth/etc start from 0 - not 1. So you'd expect this month - the 6th month - to return 5. The fact the days are wrong is very strange though
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Strange. Maybe it's the way you do
new Date(Date.now())
rather than justnew Date()
- I guess it could also be a bracketing thing.Also, the values returned for
getMonth
/etc start from 0 - not 1. So you'd expect this month - the 6th month - to return 5. The fact the days are wrong is very strange though