0
Getting the date
why does the function of getting the month give you an answer one month smaller.?example I wanted to get December which is the 12th month but instead it gave me an integer of 11.
6 ответов
+ 3
Indeed, the first month it's 0.
A quick solution it's add +1 to the result.
+ 1
Can you provide the code you used? I suspect you're using an array.
+ 1
How do you get number? Normally date() provides month as a name. You can use .format() to alter the output.
+ 1
Search for the program:Christmas countdown to see the code Muhammad Kamal
0
ok
0
Check code playground page, first example is "what a date now?". So very easy.