NAME

MouseX::Types::DateTime - A DateTime type library for Mouse

SYNOPSIS

CLASS TYPES

package MyApp;
use Mouse;
use MouseX::Types::DateTime;

has 'datetime' => (
    is     => 'rw',
    isa    => 'DateTime',
    coerce => 1,
);

has 'duration' => (
    is     => 'rw',
    isa    => 'DateTime::Duration',
    coerce => 1,
);

has 'timezone' => (
    is     => 'rw',
    isa    => 'DateTime::TimeZone',
    coerce => 1,
);

has 'locale' => (
    is     => 'rw',
    isa    => 'DateTime::Locale',
    coerce => 1,
);

CUSTOM TYPES

package MyApp;
use Mouse;
use MouseX::Types::DateTime qw(DateTime Duration TimeZone Locale);

has 'datetime' => (
    is     => 'rw',
    isa    => DateTime,
    coerce => 1,
);

has 'duration' => (
    is     => 'rw',
    isa    => Duration,
    coerce => 1,
);

has 'timezone' => (
    is     => 'rw',
    isa    => TimeZone,
    coerce => 1,
);

has 'locale' => (
    is     => 'rw',
    isa    => Locale,
    coerce => 1,
);

DESCRIPTION

MouseX::Types::DateTime creates common Mouse types and coercions for dealing with DateTime objects as Mouse attributes.

Coercions (see Mouse::TypeRegistry) are made from Str and HashRef to DateTime, DateTime::Duration, DateTime::TimeZone and DateTime::Locale objects.

TYPES

DateTime

Duration

TimeZone

Locale

AUTHOR

NAKAGAWA Masaki <masaki@cpan.org>

THANKS TO

Yuval Kogman, John Napiorkowski, "AUTHOR" in MooseX::Types::DateTime

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Mouse, Mouse::TypeRegistry,

DateTime, DateTimeX::Easy,

MooseX::Types::DateTime, MooseX::Types::DateTimeX