Field::getChange()

Version 3.8

Return the amount of the value change

Return the amount of change if value has been changed.

Type of the value depends on the fieldtype
Number: decimal
Duration: hh:mm
Time: hh:mm
Date: number of days

Return value

mixed

Full documentation

Hours has been changed:

if ( $Work->hours->isChanged() {
    $this->get('feedback','Hours has been changed: '.$Work->hours->getChange());
}

If deadline has been changed, give feedback to user:

if ( $Work->deadline->isChanged() ){
    $this->get('feedback','Deadline moved '.$Work->deadline->getChange().' days.');
}