
Solstice::DateTime::Range - Represents a range in time.

use Solstice::DateTime::Range; # initialize: my $range = new Solstice::DateTime::Range( $start_datetime, $end_datetime ); my $range = new Solstice::DateTime::Range(); $range->setStartDateTime( $start_datetime ); $range->setEndDateTime( $end_datetime ); # query! $range->isValidRange(); $range->isDateTimeBeforeRange( $other_datetime ); $range->isDateTimeAfterRange( $other_datetime ); $range->isDateTimeInRange( $other_datetime ); $range->isNowInRange(); $range->getIntervalString(); $range->toString($format);

No symbols exported.
Constructor. Returns a Solstice::DateTime::Range object.
Returns true if the start and end times are valid and the start time precedes the end
Returns true if the passed DateTime is within the range
Returns true if the passed date is before the range
Returns true if the passed date is after the range
Returns true if the range encompasses now.
Returns a formated string of the interval. The format should be strftime compatible.
Returns a formatted string that represents the interval. If passed $display_years, the returned $str will be formatted as YMDHMS, otherwise DHMS.
Solstice::DateTime, Date::Format.

Catalyst Group, <catalyst@u.washington.edu>

$Revision: 3364 $

Copyright 1998-2007 Office of Learning Technologies, University of Washington
Licensed under the Educational Community License, Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.opensource.org/licenses/ecl1.php
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.