NAME

Range::Object::Interval - Ranges as applied to time of day intervals

DESCRIPTION

This module implements ranges of time intervals. Interval is either 15, 30 or 60 minutes and always starts at the beginning of an hour or where previous interval ended; i.e. 00:15, 01:30 and 03:45 are valid interval start times but 08:08, 09:57 and 04:35 are not. Note that only interval starting times are specified; interval ending time is implicitly added when checking if a value is in range and returning inclusive range boundaries.

This module uses 24-hour clock.

METHODS

military([$separator])

Returns the list of intervals in short military format, i.e. 00:00 returned as 0, 00:30 as 30, 05:30 as 530 and so on. Besides being formatted, range is returned inclusive, i.e. containing interval ending times.

Note that this format cannot be fed back to add() or remove() since there is no way to distinguish certain time intervals in military format from any run of the mill integer numbers.

military() always returns collapsed output in both list and scalar context.

In scalar context it can use optional list $separator instead of default one.

For other methods, see Range::Object.

BUGS AND LIMITATIONS

There are no known bugs in this module. Please report problems to author, patches are welcome.

LICENSE AND COPYRIGHT

Copyright (c) 2011-2017 Alex Tokarev <tokarev@cpan.org>.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.