Date-Utility

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    is greater than days in the new month, it will take the day of end
    month. e.g.

        print Date::Utility->new('2000-03-31')->minus_months(1)->date_yyyymmdd;
        # will print 2000-02-28

 create_trimmed_date

    Takes the following argument as named parameter:

      * year - calendar year of the date (Integer)

      * month - calendar month of the date. (Integer)

      * day - day of the month of the date. (Integer)

    Returns a valid Date::Utility object whose date part is same with the
    given year, month and day and time part is not changed. If the day is
    greater than the max day in that month , then use that max day as the
    day in the new object.

DEPENDENCIES

lib/Date/Utility.pm  view on Meta::CPAN

}

*_minus_months = \&minus_months;

=head2 create_trimmed_date

Takes the following argument as named parameter:

=over 4

=item * C<year> - calendar year of the date (Integer)

=item * C<month> - calendar month of the date. (Integer)

=item * C<day> - day of the month of the date. (Integer)

=back

Returns a valid L<Date::Utility> object whose date part is same with the given year, month and day and time part is not changed. If the day is greater than the max day in that month , then use that max day as the day in the new object.

=cut

sub create_trimmed_date {

lib/Date/Utility.pod  view on Meta::CPAN


    print Date::Utility->new('2000-03-31')->minus_months(1)->date_yyyymmdd;
    # will print 2000-02-28

=head2 create_trimmed_date

Takes the following argument as named parameter:

=over 4

=item * C<year> - calendar year of the date (Integer)

=item * C<month> - calendar month of the date. (Integer)

=item * C<day> - day of the month of the date. (Integer)

=back

Returns a valid L<Date::Utility> object whose date part is same with the given year, month and day and time part is not changed. If the day is greater than the max day in that month , then use that max day as the day in the new object.

=head1 DEPENDENCIES

=over 4



( run in 0.480 second using v1.01-cache-2.11-cpan-5dc5da66d9d )