Dates are entered in the format: new Date(year, month, day, hours, minutes, seconds, milliseconds)
where day, hours, minutes, seconds, milliseconds are optional (default for day is 1, the others default to 0), so f you want to enter the date "April 7, 2014", it would be like this: new Date(2014, 3, 7) The "3" refers to April (April is the 4th month, which is 3 in a zero-indexed system). On Monday, April 7, 2014 3:51:37 PM UTC-4, MS wrote: > > I am new to programming. Wondering if it would it be possible to let me > know what the final code will look like after it subtracts one from the > month based on your recommendation? > > Thank you, > Manoj > > On Monday, April 7, 2014 12:57:15 PM UTC-5, asgallant wrote: >> >> This is not something that will be fixed - it was a deliberate design >> decision on the part of the people who designed javascript, and there is >> practically zero chance that it will ever be changed. You need to adjust >> the way you input data to account for this (it should be as simple as >> subtracting 1 from the month input). >> >> On Monday, April 7, 2014 1:03:31 PM UTC-4, MS wrote: >>> >>> or is there anything I need to change so the dates display properly? >>> >>> MS >>> >>> On Monday, April 7, 2014 12:01:55 PM UTC-5, MS wrote: >>>> >>>> so, will this problem be fixed soon? >>>> >>>> MS >>>> >>>> On Monday, April 7, 2014 10:43:04 AM UTC-5, asgallant wrote: >>>>> >>>>> To clarify: months are zero-indexed in *javascript*, not specifically >>>>> the Visualization API. >>>>> >>>>> On Monday, April 7, 2014 3:42:50 AM UTC-4, [email protected] wrote: >>>>>> >>>>>> Months are zero-based in the visualization API. Date(2014, 1, 21) is >>>>>> the 21st of February. >>>>>> >>>>> -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
