The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Set::Infinite::Date - 'date' scalar - Deprecated - use Date::Set instead

SYNOPSIS

This module is obsolete - use Date::Set instead

        use Set::Infinite::Date;

        $a = Set::Infinite::Date->new("10:00");

        This module requires Time::Local

USAGE

        $a = Set::Infinite::Date->new();
        $a = Set::Infinite::Date->new('2001-02-30 10:00:00');
        $a = Set::Infinite::Date->new('2001-02-30');
        $a = Set::Infinite::Date->new('10:00:00');
        $a = Set::Infinite::Date->new($b);

Perl:

        @b = sort @a;
        print $a;

Date input format: All HTTP::Date formats, plus:

        ('2001-02-30 10:00', '11:00')
        ('2001-02-30 10:00:00', '11:00:00')
                means day 2001-02-30, from 10:00:00 to 11:00:00

        ('10:00', '11:00') or
        ('10:00:00', '11:00:00') 
                means from 10:00:00 to 11:00:00; day is not specified

        (10000, 11888) 
                time-number format (seconds since epoch)

String conversion functions:

        0 + $s  returns the Date as a time-number (epoch).
                        This is faster than     date2time or hour2time.

        time2date 
        date2time 
        time2hour 
        hour2time

        date_format($s) 
                $s is a string containing any combination of the words:
                'year' 'month' 'day' 'hour' 'min' 'sec'
                examples: 
                        "year-month-day hour:min:sec" (default)
                        "month/day"
                        "min:sec"
        date_format returns the date format string.

Internal functions: $a->mode($b); mode can be 0 - epoch 1 - beginning in 00:00:00 2 - absolute dates like 2001-01-01 00:00:00

TODO

        $time_format for mode=1
        understand input using date_format/time_format

AUTHOR

        Flavio Soibelmann Glock <fglock@pucrs.br>