wasimshaikh / php-calendar

Automatically exported from code.google.com/p/php-calendar
1 stars 0 forks source link

Month is out of range. #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. try clicking "next month" past December of the current year 
2.
3.

What is the expected output? What do you see instead?
It should change to January of the next year.

What version of the product are you using? On what operating system?
2.0 beta 8 windows 7

Please provide any additional information below.
error message "Month is out of range."

Original issue reported on code.google.com by ntalvar...@gmail.com on 3 Jul 2010 at 10:41

GoogleCodeExporter commented 9 years ago
I have a VERY limited knowledge of coding but couldn't a simple if else 
statement solve this? 

++++++++++++++++++++++++++++++++++++++++
if 'display_month' = "December"
   $year + 1, $month + 1);
else
   $year, $month + 1;
++++++++++++++++++++++++++++++++++++++++

I tried it but I don't think this is the right function or syntax...
Can any of you coding people help me out here.

Original comment by ntalvar...@gmail.com on 3 Jul 2010 at 11:02

GoogleCodeExporter commented 9 years ago
Never mind "$month + 1" will not work anyway if it is december...

Original comment by ntalvar...@gmail.com on 3 Jul 2010 at 11:06

GoogleCodeExporter commented 9 years ago
Thanks for the report! I had a method in that would turn months > 12 into the 
appropriate month and add an appropriate number of years to the year. This was 
causing some security issues (possibly), so I removed it. I missed fixing this 
bit of code that relied on it. It's fixed now in SVN r460 and will be in the 
next release.

Original comment by sproctor@gmail.com on 8 Jul 2010 at 3:49