google-code-export / google-ajax-examples

Automatically exported from code.google.com/p/google-ajax-examples
1 stars 1 forks source link

Annotated Timeline Chart displays wrong dates! #89

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to: 
http://code.google.com/apis/ajax/playground/?type=visualization#annotated_time_l
ine
2. Notice that the dates in the code are between Jan 1, 2008 and Jan 4, 2008
3. Notice that the dates in the chart x-axis are between Feb 1, 2008 and Feb 4, 
2008

What is the expected output? What do you see instead?
Should be Jan 1, 2008 to Jan 4, 2008, but shows Feb 1, 2008 to Feb 4, 2008

What version of the product are you using? On what operating system?
The one on your website above on Mac OS X, Google Chrome 14.0.835.186

Please provide any additional information below.

Original issue reported on code.google.com by brian.a....@gmail.com on 29 Sep 2011 at 12:11

GoogleCodeExporter commented 9 years ago
I can confirm this error. I noticed it first on my site, and then I checked on 
this Google code playground page: 
http://code.google.com/apis/ajax/playground/#annotated_time_line
For example: Date(2008, 1 ,2) should be 2nd January 2008 (and not February). 
I hope this error will be fixed soon.. thx.
Regards from Hungary.
Igi

Original comment by gaspar....@gmail.com on 2 Nov 2011 at 3:01

GoogleCodeExporter commented 9 years ago
In the meantime I found some solution. The problem is probably the month array 
use key from 0-11 (and not from 1-12). Just reduce your month with 1 and 
everything will work fine (include correct 30,31 day months). I test it on my 
site http://idojarasbudapest.hu/archivalt-idojaras and it works fine (until G 
team change this bug - I hope I will notice it on time :-(  )
Igi

Original comment by gaspar....@gmail.com on 3 Nov 2011 at 6:49