No, that doesn't work, as the correct way to write it is year followed
by month, and not month followed by year.
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)
--d
Dave Rolsky wrote:
On Mon, 6 Feb 2006, Tatsuhiko Miyagawa wrote:
How can I get "Year + Month" with DateTime::Locale framework?
All I want is a string for a valid year-month, like:
January, 2006 (en_US)
2006 �� 1 �� (ja_JP)
Neither of available formats like lond_date_format, full_date_format
and medium_date_format suffice my need.
$dt->strftime( '%B, %Y' );
The month and day names used by strftime respect locales, so you can
always use that to get different results.
-dave
/*===================================================
VegGuide.Org www.BookIRead.com
Your guide to all that's veg. My book blog
===================================================*/