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


Time-Piece-Range documentation  | view source Contained in the Time-Piece-Range distribution.

Index


NAME

Top

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

SYNOPSIS

Top

	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

Top

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

Top

Tony Bowden

BUGS and QUERIES

Top

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

COPYRIGHT AND LICENSE

Top


Time-Piece-Range documentation  | view source Contained in the Time-Piece-Range distribution.