• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

lib/Time/Piece/H06-Sep-2005-7610

t/H06-Sep-2005-12993

ChangesH A D06-Sep-2005319 159

MANIFESTH A D06-Sep-2005141 109

META.ymlH A D06-Sep-2005394 1311

Makefile.PLH A D27-Oct-2004423 1611

READMEH A D06-Sep-20051.5 KiB5134

README

1NAME
2    Time::Piece::Range - deal with a range of Time::Piece objects
3
4SYNOPSIS
5            use Time::Piece::Range;
6
7            my $range = Time::Piece::Range->new($t1, $d2);
8
9            my $earliest = $range->start;
10            my $latest = $range->end;
11            my $days = $range->length;
12
13            if ($range->includes($d3)) { ... }
14            if ($range->includes($range2)) { ... }
15
16            if ($range->overlaps($range2)) {
17                    my $range3 = $range->overlap($range2);
18            }
19
20            foreach my $date ($range->dates) { ... }
21
22            my $range3 = $range->gap($range2);
23
24            if ($range->abuts($range2)) { ... }
25
26DESCRIPTION
27    This is a subclass of Date::Range that uses Time::Piece objects rather
28    than Date::Simple objects.
29
30    It only works at the precision of complete days - times are ignored in
31    all calculations.
32
33AUTHOR
34    Tony Bowden
35
36BUGS and QUERIES
37    Please direct all correspondence regarding this module to:
38    bug-Time-Piece-Range@rt.cpan.org
39
40COPYRIGHT AND LICENSE
41      Copyright (C) 2003-2005 Tony Bowden.
42
43      This program is free software; you can redistribute it and/or modify it under
44      the terms of the GNU General Public License; either version 2 of the License,
45      or (at your option) any later version.
46
47      This program is distributed in the hope that it will be useful, but WITHOUT
48      ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
49      FOR A PARTICULAR PURPOSE.
50
51