GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Time::Piece::Range(3) User Contributed Perl Documentation Time::Piece::Range(3)

Time::Piece::Range - deal with a range of Time::Piece objects

        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)) { ... }

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.

Tony Bowden

Please direct all correspondence regarding this module to: bug-Time-Piece-Range@rt.cpan.org

  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.
2005-09-06 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.