We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shelly-porssisahko/src/shelly-porssisahko.js
Line 382 in 6675f1e
#1 Solution is to use something like this: month > 12 ? 1 : month #2 Solution is even better: new Date().toISOString().slice(0,10) + tadatada
The text was updated successfully, but these errors were encountered:
Hello
I don't understand how it could give a month 13?
getMonth() returns month index, so today it returns 10 and in december 11. So +1 is 12.
getMonth()
10
11
Sorry, something went wrong.
Ahh, you are right. I think it was very late and my mathematics was upside down :)
Thanks for confirming!
I know the feeling 😄
No branches or pull requests
shelly-porssisahko/src/shelly-porssisahko.js
Line 382 in 6675f1e
In December this formula gives a month 13.
getMonth() + 1
#1 Solution is to use something like this: month > 12 ? 1 : month
#2 Solution is even better: new Date().toISOString().slice(0,10) + tadatada
The text was updated successfully, but these errors were encountered: