Changeset 10969 for OpenPNE3/trunk/lib/validator/opValidatorDate.class.php
- Timestamp:
- Mar 9, 2009, 5:01:01 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE3/trunk/lib/validator/opValidatorDate.class.php
r10819 r10969 134 134 } 135 135 136 137 if ($this->hasOption('max')) 138 { 139 $max = new DateTime($this->getOption('max')); 140 if ($max && $clean->format('U') > $max->format('U')) 141 { 142 throw new sfValidatorError($this, 'max', array('max' => $max->format('Y-m-d'))); 143 } 144 } 145 146 if ($this->hasOption('min')) 147 { 148 $min = new DateTime($this->getOption('min')); 149 if ($min && $clean->format('U') < $min->format('U')) 150 { 151 throw new sfValidatorError($this, 'min', array('min' => $min->format('Y-m-d'))); 152 } 153 } 154 136 155 return $clean; 137 156 }
Note: See TracChangeset
for help on using the changeset viewer.