App-TimelogTxt

 view release on metacpan or  search on metacpan

lib/App/TimelogTxt/Utils.pm  view on Meta::CPAN

    my ($stamp) = @_;
    my $epoch = stamp_to_localtime( $stamp ) - 12 * 3600; # noon today
    return fmt_date( $epoch - 86400 ); # noon yesterday
}

sub day_stamp
{
    my ( $day ) = @_;
    return today_stamp() if is_today( $day );

    # Parse the string to generate a reasonable guess for the day.
    return canonical_datestamp( $day ) if is_datestamp( $day );

    $day = lc $day;
    return unless grep { $day eq $_ } $YESTERDAY, @DAYS;

    my $now   = time;
    my $delta = 0;
    if( $day eq $YESTERDAY )
    {
        $delta = 1;



( run in 1.564 second using v1.01-cache-2.11-cpan-702932259ff )