On Wed, 8 Feb 2006, Daisuke Maki wrote:

What Miyagawa-san is saying is that, depending on the locale even the order of words change. This can certainly be achieved by using things like Locale::Maketext, but that kind of defeats the purpose of having a locale module for DateTime, after all...

I think we just need a format like year_month_format.

 $dt->strftime($dt->locale->year_month_format)

Ah, I get it. I was wondering why he was asking such a basic question ;)

The problem with what you propose is that the locales are generated by parsing data from the ICU project, so we need to calculate that format from the data somehow.

We can sort of get this by looking at the short_date_format to see if the year comes before the month, or vice versa, but that won't tell us that we need a comma in the English version after the month.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

Reply via email to