As discussed in a few occasions<https://groups.google.com/d/msg/google-visualization-api/bN4O7So-K-E/enCK0FCAInAJ>in the past, this is not bug, but the Javascript standard for Date representation. Months are numbered from 0 (January) to 11 (December), meaning that month 8 is actually the 9th, aka September.
This is defined in the ECMAscript standard (section 15.9.1.4 of http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf) and also clarified in simpler terms here ( https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date). It has been like this, well, for quite a while :-). /R. On 16 August 2011 21:34, Alex <[email protected]> wrote: > I am using the HTML table API. 1 of the columns displays a date value. > However, there must be a new bug introduced to the API since I didn't > see this problem before. > > In summary, if I put in > data.addRow([new Date(2011, 8, 11)]); > > The HTML table generated will show "Sep 11, 2011" (in stead of "Aug > 11, 2011") > > I don't even have show my code because you can see the error in Google > live example in the following URL: > > > http://code.google.com/apis/chart/interactive/docs/reference.html#dateformatter > > Can someone from google take a look? > > I am currently using this for a project. If this doesn't get fixed, I > might have to use string type instead. > > Alex > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-visualization-api?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
