Javascript Date - Month Always Increment
Hello I encountered strange behavior with javascript date. I show in this example: Why is month always increment? Is normal behavior or its my problem? Thanks
Solution 1:
Javascript Date
's month starts from 0. So 7 is actually 8th Month which is August.
month
Integer value representing the month, beginning with 0 for January to 11 for December.
Solution 2:
In the JavaScript Date()
object, the the month is an integer, starting at 0
.
0
= January1
= February2
= March
and so on.
Post a Comment for "Javascript Date - Month Always Increment"