-
-
06 Sep 2005 18:17:50 UTC
- Distribution: Time-Piece-Range
- Module version: 1.2
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (1418 / 2 / 0)
- Kwalitee
Bus factor: 0- 100.00% Coverage
- License: unknown
- Activity
24 month- Tools
- Download (3.05KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Date::Range
- Time::Piece
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Time::Piece::Range - deal with a range of Time::Piece objects
SYNOPSIS
use Time::Piece::Range; my $range = Time::Piece::Range->new($t1, $d2); my $earliest = $range->start; my $latest = $range->end; my $days = $range->length; if ($range->includes($d3)) { ... } if ($range->includes($range2)) { ... } if ($range->overlaps($range2)) { my $range3 = $range->overlap($range2); } foreach my $date ($range->dates) { ... } my $range3 = $range->gap($range2); if ($range->abuts($range2)) { ... }
DESCRIPTION
This is a subclass of Date::Range that uses Time::Piece objects rather than Date::Simple objects.
It only works at the precision of complete days - times are ignored in all calculations.
AUTHOR
Tony Bowden
BUGS and QUERIES
Please direct all correspondence regarding this module to: bug-Time-Piece-Range@rt.cpan.org
COPYRIGHT AND LICENSE
Copyright (C) 2003-2005 Tony Bowden. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Module Install Instructions
To install Time::Piece::Range, copy and paste the appropriate command in to your terminal.
cpanm Time::Piece::Range
perl -MCPAN -e shell install Time::Piece::Range
For more information on module installation, please visit the detailed CPAN module installation guide.