Re: Problem with Calendar php package from PEAR: Days are skewed one day early

From: Date: Fri, 10 Nov 2006 16:39:27 +0000
Subject: Re: Problem with Calendar php package from PEAR: Days are skewed one day early
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25758@lists.php.net to get a copy of this message
On 11/10/06, Jared Farrish <farrishj@gmail.com> wrote:
Good Morning! I am working on a calendar scheduling program that runs in PHP, and I am having a problem with the Calendar package (v1.4) from the PEAR repository. Would you mind taking a look at the code to see if I've done something wrong? I have run this on a development machine that is separate from our network and experienced the same problem (all days are one day earlier, meaning today is represented as the 11th of November). I have also been digging through the Calendar package to see if there's something that might clue me in, and so far I haven't figured out what's wrong. Here's the link to the calendar script output: https://web2.unt.edu/riskman/Includes/rmes_oncallfiresafety.inc.php And here's the link to the calendar code behind: https://web2.unt.edu/riskman/Includes/rmes_oncallfiresafety.inc.php?html=true I hope someone can help me figure out what's wrong. I just can't understand why it's giving me the wrong date/day of the week combination.
Have you tried: $Month = new Calendar_Month_Weekdays($gety,$getm,0); It looks like you're making some assumptions about the day you want your week to start and applying day headers to the wrong columns. You can specify the day you want your week to start in the constructor, see the docs for more details (specifially the $firstDay parameter). http://pear.php.net/manual/en/package.datetime.calendar.calendar-month-weekdays.calendar-month-weekdays.php -- -Brett http:saltybeagle.com aim:ianswerq

« previous php.pear.general (#25758) next »