I'd like to announce the latest version of DateTime::Format::CLDR.
Compared to 1.02 it comes with a lot of improvements and bugfixes, and
from now on can be regarded as ready for production environments.

First of all the test suite has been extended and now includes over
100,000 test cases. During the writing of the the additional tests,
several bugs (especially related to time handling) were found and
corrected. Additionally a method has been included to specify the way
how incomplete date patterns are being handled: You can either set all
missing values to 1, set a callback that fills the missing values or
return a DateTime::Incomplete object. Finally support for more CLDR
patterns has been added (e.g. S{1,}, j{1,2})

For all of you who don't know DateTime::Format::CLDR yet:
This module provides a parser (and also a formatter) for datetime
strings using patterns as defined by the Unicode CLDR Project (Common
Locale Data Repository). http://unicode.org/cldr/, as supported by
DateTime and DateTime::Locale starting with version 0.40. The design
goal was to keep the API compatible to DateTime::Format::Strptime so
that it can be used as a drop-in replacement and vice-versa.

Example:

    use DateTime::Format::CLDR;

    my $cldr = new DateTime::Format::CLDR(
        pattern     => 'HH:mm:ss',
        locale      => 'de_AT',
        time_zone   => 'Europe/Vienna',
    );
    my $dt = $cldr->parse_datetime('23:16:42');
    $cldr->format_datetime($dt);
   
    # pattern is taken from 'date_format_medium' in
DateTime::Locale::de_AT ('dd.MM.yyyy')
    my $cldr = new DateTime::Format::CLDR(
        locale      => 'de_AT',
    );
   
    my $dt = $cldr->parse_datetime('23.11.2007');

Cheers
Maroš Kollár

Reply via email to