I am using the charts for some months but I've never realized that, just today I saw it.
The problem is, for example when we use [new Date(2015,01,10),1000] , it shows February, when it was supposed to show January.
Here is a fiddle example: https://jsfiddle.net/ns91ft9v/1/
And even the examples on the chart docs (https://google-developers.appspot.com/chart/interactive/docs/datesandtimes) are summing 1 month.
I couldn't find nowhere else someone reporting this issue, and I've tried on many different browsers.
Am I getting crazy or there is a real issue here?
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/eae714e8-4e57-4fad-a096-5adec57826c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
When you use the Date constructor, the month numbers start at 0, not 1. This is a frequently tripped-over issue with JavaScript Dates (as well as for most languages).
On Wed, Sep 2, 2015 at 8:03 PM, Ricardo Pereira <ricardobar...@gmail.com> wrote:
I am using the charts for some months but I've never realized that, just today I saw it.
The problem is, for example when we use [new Date(2015,01,10),1000] , it shows February, when it was supposed to show January.
Here is a fiddle example: https://jsfiddle.net/ns91ft9v/1/
And even the examples on the chart docs (https://google-developers.appspot.com/chart/interactive/docs/datesandtimes) are summing 1 month.
I couldn't find nowhere else someone reporting this issue, and I've tried on many different browsers.
Am I getting crazy or there is a real issue here?
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/eae714e8-4e57-4fad-a096-5adec57826c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.