Re: Re: PEAR:Date

From: Date: Thu, 31 Oct 2002 09:44:16 +0000
Subject: Re: Re: PEAR:Date
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2577@lists.php.net to get a copy of this message
Darren, that's one of the things im dealing with. im actually thinking of merging the Calendar and Date classes, and substituting the Calendar.set(FIELD, value) idiom for properties (cal.set(Month, JANUARY) becomes cal->month = JANUARY) in addition, ZE2 will allow me to properly handle such syntactical sugar as cal->week_of_year++ (map to internal roll or add) the TimeZone class will probably be finished in a week. bets are off on the Calendar related stuff - im very busy otherwise. "Darren Cook" <darrenj@flyingcolor.com> wrote in message news:20021031153345.DEB8.DARRENJ@flyingcolor.com... > > > // setup an i18n object which knows about the country, etc. > > > // and has methods to convert dates, based on timestamps > > > $i18n = new I18N( $myLanguage ); > > > $date = new Date( $i18n ); > > > > > again, this is kinda what Java does through the Locale class. Also what alot > > of what PEAR::Date handles is relegated in Java to the Calendar class and > > subclasses. > > The downside is that the java equivalent of something like: > $s=date("Y-m-d H:i:s"); > > is a 2-4 line monster. Not that matters so much with pear, as the user can > still fall back on PHP functions. > > Darren >

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