- or download this
my $date_constraint = Moose::Util::TypeConstraints::find_type_constrai
+nt('MyApp::DateOnly');
...
},
);
- or download this
type 'MyApp::DateOnly'
=> where { blessed($_)
&& $_->isa('DateTime')
&& $_->hour == 0 && $_->min == 0 && $_->sec == 0
};
- or download this
subtype 'MyApp::DateOnly'
=> as 'DateTime'
=> where { $_->hour == 0 && $_->min == 0 && $_->sec == 0 };