Table of Contents
This package contains extensions to the Zend Framework Date package.
For more information about the use of the date classes, see the
Zend Framework documentation for Zend_Date.
This class gives you the ability to specify a range of two dates. You can calculate the timespan between them and see if a given date is within this range.
<?php
$start = new Zend_Date(strtotime('-90 days'));
$end = new Zend_Date(); // right now
$range = new Xyster_Date_Range($start, $end);
$within = new Zend_Date('-60 days');
if ( $range->isWithin($within) ) {
// do something here
}