Help for this page

Select Code to Download


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