Field::isSameValue($value1,$value2)
Version 3.8
Check if values are the same
Version 3.8
Check if values are the same
Convert given values according to the field type and check if they are the same.
Bool TRUE if same value
Check if given arguments are same date:
if ( $Order->order_date->isSameValue('2014-01-08','Today') ){
// Today is 2014-01-08
}
Check if given arguments are same duration:
if ( $Order->order_date->isSameValue('00:30','0.5') ){
// 00:30 is same as 0.5: Half an hour.
}