App-Basis-Queue
view release on metacpan or search on metacpan
bin/qpubsub view on Meta::CPAN
state $date = Date::Manip::Date->new() ;
my @ret ;
if ( !$datetime ) {
return wantarray ? ( undef, undef ) : undef ;
} elsif ( $datetime =~ /^\d+$/ ) {
# assume anything less than five days is a time into the future
$datetime += time() if ( $datetime <= FIVE_DAYS ) ;
@ret = ( std_datetime($datetime), $datetime ) ;
} else {
# so parse will parse in locale time not as UTC
$date->parse($datetime) ;
{
# if we get a warning about converting the date to a day, there
# must be a problem with parsing the input date string
local $SIG{__WARN__} = sub {
die "Invalid date, could not parse" ;
} ;
my $day = $date->printf("%a") ;
}
state $date = Date::Manip::Date->new() ;
my @ret ;
if ( !$datetime ) {
return wantarray ? ( undef, undef ) : undef ;
} elsif ( $datetime =~ /^\d+$/ ) {
# assume anything less than five days is a time into the future
$datetime += time() if ( $datetime <= FIVE_DAYS ) ;
@ret = ( std_datetime($datetime), $datetime ) ;
} else {
# so parse will parse in locale time not as UTC
$date->parse($datetime) ;
{
# if we get a warning about converting the date to a day, there
# must be a problem with parsing the input date string
local $SIG{__WARN__} = sub {
die "Invalid date, could not parse" ;
} ;
my $day = $date->printf("%a") ;
}
lib/App/Basis/Queue.pm view on Meta::CPAN
state $date = new Date::Manip::Date ;
my @ret ;
if ( !$datetime ) {
return wantarray ? ( undef, undef ) : undef ;
} elsif ( $datetime =~ /^\d+$/ ) {
# assume anything less than five days is a time into the future
$datetime += time() if ( $datetime <= FIVE_DAYS ) ;
@ret = ( _std_datetime($datetime), $datetime ) ;
} else {
# so parse will parse in locale time not as UTC
$date->parse($datetime) ;
{
# if we get a warning about converting the date to a day, there
# must be a problem with parsing the input date string
local $SIG{__WARN__} = sub {
die "Invalid date, could not parse" ;
} ;
my $day = $date->printf("%a") ;
}
( run in 1.935 second using v1.01-cache-2.11-cpan-ceb78f64989 )