Re: Re: PACKAGE Proposal: Date_Calendar
| From: | Stefan Neufeind | Date: | Sat, 09 Aug 2003 19:50:28 +0000 |
| Subject: | Re: Re: PACKAGE Proposal: Date_Calendar | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-19456@lists.php.net to get a copy of this message | ||
On 9 Aug 2003 at 14:43, Greg Beaver wrote:
> I think the code is great, and I'm very enthusiastic about seeing this
> in PEAR. I do have one major caveat: it really does need to handle
> dates before 1970 and after 2038 to be truly useful for all cases.
> The classes are so powerful as they stand now, that it would be a
> shame to limit them in this way. I would recommend using Julian days
> as a basis, or at the very least encapsulating all base calculations
> in the DateMath class, so that the calendar can also be very easily
> converted to other formats that are non-Gregorian. This will allow
> extended classes to do things like calculate holidays that are based
> on other calendars and display them using your calendar class.
>
> All those calls to mktime could simply be replaced by calls to
> $this->_timeBase->mktime() where $_timeBase is an instance of DateBase
> (the base class that would perform all conversions and calculations).
> This would mean the only 2 classes that would need any modification
> are the Calendar and Date base class (currently DateMath)
>
> With those changes (which are rather major, and I am interested in
> helping if you need any, as I can't use the class without these
> changes), I am +1, so call me +0 :)
>
> Greg
Well, I guess Harry will try his best. But how about making a first
step (devel-release) and then pushing things forward? That seems a
better idea to me since you "can't change the world in one day". If
you can change it step by step I guess thats the way to go.
Stefan