比较yii框架中的时间


Comparing time in yii framework

如何在模型中比较函数中的两个时间类型变量?

:

first_hour -(minus) end_hour > 10 minutes

实际上,就是这个操作

试试这个:

array('myDate', 'type', 'type' => 'date', 'message' => '{attribute}: is not a date!', 'format'=>'yyyy-M-d H:m:s')