The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DateTime::Ordinal - The great new DateTime::Ordinal!

VERSION

Version 0.02

SYNOPSIS

Quick summary of what the module does.

        use DateTime::Ordinal;

        my $dt = DateTime::Ordinal->new(
                year    => 3000,
                month   => 4,
                day     => 1,
                hour    => 2,
                minute  => 3,
                second  => 4,
        );

        $dt->day                # 1
        $dt->day('o')           # 1st
        $dt->day('f')           # one
        $dt->day('of')          # first

        $dt->hour               # 2
        $dt->hour('o')          # 2nd
        $dt->hour('f')          # two
        $dt->hour('of')         # second

        $dt->minute             # 3
        $dt->minute('o')        # 3rd
        $dt->minute('f')        # three
        $dt->minute('of')       # third

        $dt->second             # 4
        $dt->second('o')        # 4th
        $dt->second('f')        # four
        $dt->second('of')       # fourth

        $dt->strftime("It's the %M(of) minute of the %H(o) hour on day %d(f) in the %m(of) month within the year %Y(f)");
        # "It's the third minute of the 2nd hour on day one in the fourth month within the year three thousand");

        ...

        use Lingua::ITA::Numbers
        use DateTime::Ordinal (
                sub_format => {
                        f => sub {
                                my $number = Lingua::ITA::Numbers->new(shift);
                                return $number->get_string;
                        }
                }
        );

        my $dt = DateTime::Ordinal->new(
                hour    => 1,
                minute  => 2,
                second  => 3,
                locale  => 'it'
        );

        $dt->hour('f')          # uno
        $dt->minute('f')        # due
        $dt->second('f')        # tre

SUBROUTINES/METHODS

strftime

month

mon

month_0

mon_0

day_of_month

day

mday

weekday_of_month

quarter

day_of_month_0

day_0

mday_0

day_of_week

wday

dow

day_of_week_0

wday_0

dow_0

local_day_of_week

day_of_quarter

doq

day_of_quarter_0

doq_0

day_of_year

doy

day_of_year_0

doy_0

hour

hour_1

hour_12

hour_12_0

minute

min

second

sec

nanosecond

millisecond

microsecond

leap_seconds

week

year

week_year

week_number

week_of_month

strptime

AUTHOR

LNATION, <thisusedtobeanemail at gmail.com>

BUGS

Please report any bugs or feature requests to bug-datetime-ordinal at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=DateTime-Ordinal. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

        perldoc DateTime::Ordinal

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2019 by LNATION.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)