[ please keep discussion on the datetime@perl.org list ]

On Mon, 6 Jul 2009, Luc St-Louis wrote:

Hi Dave,

I was trying to install DateTime::Format::Strptime this morning, but
tests were failing. I think I tracked it down to DateTime::Locale whose
generated files (like DateTime/Locale/en.pm) appear to be broken. I was
able to build the test files in tools/t/test-data with
tools/generate-from-cldr, and there are differences like the following,
in en.pm for example:

    {
   -    my $date_format_full = "EEEE\,\ MMMM\ d\,\ yyyy";
   +    my $date_format_full = "EEEE\,\ MMMM\ d\,\ y";
        sub date_format_full { return $date_format_full }
    }

That 'y' instead of 'yyyy' appears to be wrong and breaks tests in
DateTime::Format::Strptime.

This data comes from the latest CLDR data. If you look at the 1.7.1 en.xml files you'll see:

<dateFormatLength type="full">
    <dateFormat>
        <pattern>EEEE, MMMM d, y</pattern>
    </dateFormat>
</dateFormatLength>

So the corresponding en.pm file seems correct to me.

The Strptime tests rely on a given pattern from a given release of DateTime::Locale, which is not a good idea.

It'd be best if Strptime could include some copies of the locale data for its own testing.


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/

Reply via email to