Re: PEAR:Date
| From: | Martin Jansen | Date: | Thu, 31 Oct 2002 17:36:19 +0000 |
| Subject: | Re: PEAR:Date | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-10385@lists.php.net to get a copy of this message | ||
On Thu Oct 31, 2002 at 03:4157PM +0100, Lukas Smith wrote:
> How does Date handle I18N?
> I assume you atleast partly depend on setlocale()?
> I actually havent used setlocale() all that much, so I am just
> wondering if this is a reliable solution (since it does rely on correct
> settings outside of PHP etc.)
>
> So I guess what I mean is if it would make sense to have an alternative
> to setlocale().
I guess that setlocale() is the most straightforward way to handle
I18N for PEAR::Date. But actually I'm a bit afraid that Date will not
honor changig LC_Time, because it uses it's own method format() to
create dates. (I may be wrong, because I've only quickly looked over
the code.)
> // The constant telling us what day starts the week. Monday (1) is the
> // international standard. Redefine this to 0 if you want weeks to
> // begin on Sunday.
> define('DATE_CALC_BEGIN_WEEKDAY', 1);
>
> Is this constant really used in the entire application?
> Can't setlocale() handle this?
Perhaps people want to adjust this setting independent of their locale
environment!?
> Finally there are some whitespace issues on the files, as well as imho
> too many missing curly brackets. This I can quickly fix for you
> (actually I already have). Should I send you the patch or just commit?
Just go ahead with our style changes. Logical changes should be
announced here first.
--
- Martin Martin Jansen
http://martinjansen.com/