DateTime-Lite
view release on metacpan or search on metacpan
DateTime::Lite->compare_ignore_floating( $dt1, $dt2 );
$dt->is_between( $lower, $upper );
# Class-level settings
DateTime::Lite->DefaultLocale('fr-FR');
my $class = $dt->duration_class; # 'DateTime::Lite::Duration'
# Constants
DateTime::Lite::INFINITY(); # +Inf
DateTime::Lite::NEG_INFINITY(); # -Inf
DateTime::Lite::NAN(); # NaN
DateTime::Lite::MAX_NANOSECONDS(); # 1_000_000_000
DateTime::Lite::SECONDS_PER_DAY(); # 86400
# Error handling
my $dt2 = DateTime::Lite->new( %bad_args ) ||
die( DateTime::Lite->error );
# Chaining: bad calls return a NullObject so the chain continues safely;
# check the return value of the last call in the chain.
my $result = $dt->some_method->another_method ||
die( $dt->error );
DateTime::Lite->compare_ignore_floating( $dt1, $dt2 );
$dt->is_between( $lower, $upper );
# Class-level settings
DateTime::Lite->DefaultLocale('fr-FR');
my $class = $dt->duration_class; # 'DateTime::Lite::Duration'
# Constants
DateTime::Lite::INFINITY(); # +Inf
DateTime::Lite::NEG_INFINITY(); # -Inf
DateTime::Lite::NAN(); # NaN
DateTime::Lite::MAX_NANOSECONDS(); # 1_000_000_000
DateTime::Lite::SECONDS_PER_DAY(); # 86400
# Error handling
my $dt2 = DateTime::Lite->new( %bad_args ) ||
die( DateTime::Lite->error );
# Chaining: bad calls return a NullObject so the chain continues safely;
# check the return value of the last call in the chain.
my $result = $dt->some_method->another_method ||
die( $dt->error );
lib/DateTime/Lite.pm view on Meta::CPAN
DateTime::Lite->compare_ignore_floating( $dt1, $dt2 );
$dt->is_between( $lower, $upper );
# Class-level settings
DateTime::Lite->DefaultLocale('fr-FR');
my $class = $dt->duration_class; # 'DateTime::Lite::Duration'
# Constants
DateTime::Lite::INFINITY(); # +Inf
DateTime::Lite::NEG_INFINITY(); # -Inf
DateTime::Lite::NAN(); # NaN
DateTime::Lite::MAX_NANOSECONDS(); # 1_000_000_000
DateTime::Lite::SECONDS_PER_DAY(); # 86400
# Error handling
my $dt2 = DateTime::Lite->new( %bad_args ) ||
die( DateTime::Lite->error );
# Chaining: bad calls return a NullObject so the chain continues safely;
# check the return value of the last call in the chain.
my $result = $dt->some_method->another_method ||
die( $dt->error );
s++; if (s == send || (*s != 'F' && *s != 'f')) return 0;
s++; if (s < send && (*s == 'I' || *s == 'i')) {
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++; if (s == send || (*s != 'I' && *s != 'i')) return 0;
s++; if (s == send || (*s != 'T' && *s != 't')) return 0;
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
return 0;
if (sawinf) {
numtype &= IS_NUMBER_NEG; /* Keep track of sign */
numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT;
( run in 2.281 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )