Re: Re: PEAR:Date
| From: | Darren Cook | Date: | Thu, 31 Oct 2002 06:37:54 +0000 |
| Subject: | Re: Re: PEAR:Date | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-2573@lists.php.net to get a copy of this message | ||
> > // 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