"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "framework/utils/CFormatter.php" between
yii-1.1.21.733ac5.tar.gz and yii-1.1.22.bf1d26.tar.gz

About: Yii is a high-performance component-based PHP framework for developing large-scale Web applications. Hint: Yii 1.1 is now in maintenance mode.

CFormatter.php  (yii-1.1.21.733ac5):CFormatter.php  (yii-1.1.22.bf1d26)
skipping to change at line 232 skipping to change at line 232
/** /**
* Normalizes an expression as a timestamp. * Normalizes an expression as a timestamp.
* @param mixed $time the time expression to be normalized * @param mixed $time the time expression to be normalized
* @return int the normalized result as a UNIX timestamp * @return int the normalized result as a UNIX timestamp
*/ */
protected function normalizeDateValue($time) protected function normalizeDateValue($time)
{ {
if(is_string($time)) if(is_string($time))
{ {
if(ctype_digit($time) || ($time{0}=='-' && ctype_digit(su bstr($time, 1)))) if(ctype_digit($time) || ($time[0]=='-' && ctype_digit(su bstr($time, 1))))
return (int)$time; return (int)$time;
else else
return strtotime($time); return strtotime($time);
} }
elseif (class_exists('DateTime', false) && $time instanceof DateT ime) elseif (class_exists('DateTime', false) && $time instanceof DateT ime)
return $time->getTimestamp(); return $time->getTimestamp();
else else
return (int)$time; return (int)$time;
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)