Actually you can do this with MX::Types too: use MooseX::Types -declare => [qw( MyDate DateTime )]; use MooseX::Types::Moose qw( Str Int HashRef Object ); use DateTime;
class_type DateTime, { class => 'DateTime' }; subtype MyDate, as DateTime, where { ! $_->hour }; Or, whatever makes your subtype special from a regular DateTime that has hours/min/seconds, etc. I'd probably leave it and just truncate later though. DateTime is known to have some issues when it acts like a plain Date module. -- Evan Carroll System Lord of the Internets