TIMEline Charts API Zero shows up as JAN in tool tips.. and so on.

22 views
Skip to first unread message

Rajesh Sharma

unread,
Apr 24, 2023, 11:14:42 AM4/24/23
to Google Visualization API
The months in this start with ZERO... 
new Date($YY,$MM,$DD)

When $MM is zero. It shows Jan, Tool tips. 
It should be 1. 


Ray Thomas

unread,
Apr 25, 2023, 11:29:56 PM4/25/23
to Google Visualization API
Hi Rajesh,

It is to do with how JavaScript counts months, they start from 0 not 1, and run from 0 (January) to 11 (December). It does it with days of the week as well, the first day of the week is 0 and run from 0 (Sunday) to 6 ( Saturday).

Ray
Reply all
Reply to author
Forward
0 new messages