The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Locale::Handle::Pluggable::DateTime - Localize DateTime objects with your maketext handles.

SYNOPSIS

    package My::I18N;
    use Moose;

    extends qw(
        Locale::Maketext
        Locale::Handle::Pluggable::DateTime
        Locale::Handle::Pluggable
    );

    # and then you can use your maketext handle to localize dates too
    $handle->loc( DateTime->now ); # localizied to $handle's language

DESCRIPTION

This package extends the Locale::Maketext::Pluggable with a variant method for DateTime objects.

ATTRIBUTES

time_zone

If set all DateTime objects being localized will also have their time zone set to this value.

This is a "DateTime::TimeZone" in MooseX::Types::DateTime with coercions enabled.

METHODS

loc

Adds a variant method that goes to loc_date with DateTime from MooseX::Types::DateTime as the variant.

loc_date

Localize a DateTime object using DateTime::Locale and the handle's language.