pear calendar
| From: | (PHPDiscuss - PHP Newsgroups and mailing lists) | Date: | Sun, 16 May 2004 21:51:34 +0000 |
| Subject: | pear calendar | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-12529@lists.php.net to get a copy of this message | ||
hello again!
sorry, but I have yet another question. This time about pear calendar.
I've found out about how if you define CALENDAR_ENGINE to PearDate, you
can go before 1970 or after 2038 in dates. So I tried it and it works
beautifully; but I seem to have oen problem, which I think (not positive
but might) be related to doing this.
I want to use the adjust method for when a date is invalid; and it makes
my coding a little easier when I go to a previous or next month. However I
have noticed that this isn't always accurate. for instance if I go from
january 2004 to December 2003 (with month 0 year 2004), the end day of
december 2003 is a few days before the beginning day of january. according
to the calendar jan 1 is on a Thursday, and then I use adjust with the
invalid date month 0 of 2004, it says that dec 31 is on Monday. If I just
enter month 12 of 2003 it works fine, though. I thought this might be
because, well, I don't think using the PearDate option uses timestamps,
does it? does adjust rely on these timestamps to fix the problem? I may be
way off course here, but it is a guess.
Second question is a curiosity. How far back or ahead can it go with use
PearDate in that definition? I have gone pretty far back and it has not
complained...though it does have a problem with leap years before year
1000 :)!!!! not that that should be of any major worry...
but should it be able to go back to year 1 CE? It hasn't complained when I
tried, but, well, just curious.