Re: pear calendar
| From: | (PHPDiscuss - PHP Newsgroups and mailing lists) | Date: | Mon, 17 May 2004 09:42:38 +0000 |
| Subject: | Re: pear calendar | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12536@lists.php.net to get a copy of this message | ||
Stefan Neufeind wrote:
> On 16 May 2004 at 19:17, Site Resources wrote:
> > Thanks for your help. You answered my second question fine. I could be
wrong but I don't think there is supposed to be a year 0. Just from year 1 BCE
to year 1 CE; but my understanding may be wrong. but that doesn't matter here.
I've tried out year 0 in the calendar and that also works fine.
> >
> > Ok, I will try to rephrase what I said. As for the source, it is 193 lines
and so...well I'll post that at the bottom. you can look at it if you don't
understand my question still after I explain it here.
> Well, I was able to replay the scenario you described with the source
> you provided. But still I wonder why you're going for "month = 0" in
> your example. Simply consider changing month = 0 and year = 2004 to
> month = 12 and year = 2004 ... where's the problem? Note that the
> same applies also for "Next month" where from year 2003, month 12 you
> jump to year 2003, month 13 ... which should actually be month 1 or
> year 2004.
> Maybe somebody from the Date-team could comment as well if they could
> integrate some checks to do things like this automatically. But I
> wonder why anybody would call a function with a month-value out of
> bounds [1..12].
> Regards,
> Stefan
Yes I could do that, but I also wanted to be able to adjust the date no
matter what is entered instead of having to give an error. If nothing else
is possible I can do that, but if anyone knows why this is happening,
that'd be great.