Horde_Icalendar::_checkEndDate PHP Method

_checkEndDate() protected method

Utility method to aid in checking the end date of a transition.
protected _checkEndDate ( integer $t, array $times ) : boolean
$t integer The timestamp of the date we are checking.
$times array A transition array.
return boolean True if $t is before the end date of the transition otherwise false.
    protected function _checkEndDate($t, $times)
    {
        if (empty($times['end'])) {
            return true;
        }
        if (strlen($times['end']) == 4) {
            $date = @gmmktime(0, 0, 0, 1, 1, $times['end']);
            if ($date && $t < $date) {
                return true;
            }
            return false;
        }
        if ($t < $times['end']) {
            return true;
        }
    }