> -----Original Message-----
> From: Dave Rolsky [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 22, 2006 12:17 AM
> To: datetime
> Subject: RE: Formatting dates for locales/time zones
>
> On Tue, 21 Mar 2006, Garrett, Philip (MAN-Corporate) wrote:
> 
> > My aversion is more philosophical than practical. I'm working on
> > internationalizing some software right now, and (of course) one of
> > the main goals is to decouple presentation from data. I chose
> > DateTime for my date needs only to later find that the presentation
> > (locale/output time zone) for this core support module is embedded
> > in its data. It's the very thing I've been struggling against for
> > months.
> >
> > I'm actually quite surprised that *you* don't see this as a problem.
> 
> The alternative would be to require a locale object to be passed in
> to every call to month_name(), month_abbr(), day_name(), and
> day_abbr(). Philosophical purity of design lost out over massive
> convenience in use.

I understand. I'm sure formatting the date directly from the date object
(as opposed to with a formatter) is by far the most common usage.

> Now, I could allow an _optional_ locale object argument if that'd make
> it easier for folks to use. But I certainly don't want those methods
> to blow up if you call them without any args.

Well, my goal is to have $formatter->format_datetime($date) use
the $formatter's time zone and locale. If this would help to that end,
I'm all for it.

Philip

Reply via email to