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

NAME

App::Pebble::Helpers::DateTime - DateTime helpers.

DESCRIPTION

Support DateTime objects "natively" by making sure they TO_JSON-ify properly, and provide some useful helper methods.

METHODS

DateTime::round( $to_unit = "day" ) : $self

Round off the datetime $to_unit ( "year" | "month" | "day" | "hour" | "minute" | "second" ) by setting the smaller units to 0 (e.g. minutes) or 1 (e.g. month).

Change the object in-place.

Note: This should be ported into DateTime proper. It's just here for now to provide a convenience function.