Subject: | Incorrect CLDR->Strftime translation |
Date: | Fri, 9 Oct 2009 17:45:59 -0400 |
To: | bug-datetime-locale [...] rt.cpan.org |
From: | Kevin Falcone <falcone [...] bestpractical.com> |
An option RT feature uses DateTime::Locale to allow users to better
control their date formatting. It was developed against an older
DateTime::Locale and thus uses full_date_format rather than
date_format_full.
Unfortunately, in 0.44 (and cldr 1.7.1), the en definition of full_date_format changed:
- my $date_format_full = "EEEE\,\ MMMM\ d\,\ yyyy";
+ my $date_format_full = "EEEE\,\ MMMM\ d\,\ y";
If you feed cldr EEEE, MMMM d, y to $datetime->format_cldr
you get a 4 digit year.
Unfortunately, the DateTime::Locale::Base cldr to strftime function
converst the single y into %y which is not a 4 digit year
I've attached strftime_to_cldr.t which demonstrates the issue and a
patch to Base.pm which changes the behavior.
-kevin
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.