| @@ 1310-1318 (lines=9) @@ | ||
| 1307 | // normalizes to itself is the actual minimum for the current date |
|
| 1308 | $result = $fieldValue; |
|
| 1309 | ||
| 1310 | do { |
|
| 1311 | $work->set($field, $fieldValue); |
|
| 1312 | if ($work->get($field) != $fieldValue) { |
|
| 1313 | break; |
|
| 1314 | } else { |
|
| 1315 | $result = $fieldValue; |
|
| 1316 | $fieldValue--; |
|
| 1317 | } |
|
| 1318 | } while ($fieldValue >= $endValue); |
|
| 1319 | ||
| 1320 | return $result; |
|
| 1321 | } |
|
| @@ 2748-2756 (lines=9) @@ | ||
| 2745 | // we get a value that normalizes to another value. The last value that |
|
| 2746 | // normalizes to itself is the actual maximum for the current date |
|
| 2747 | $result = $startValue; |
|
| 2748 | do { |
|
| 2749 | $work->set($field, $startValue); |
|
| 2750 | if ($work->get($field) != $startValue) { |
|
| 2751 | break; |
|
| 2752 | } else { |
|
| 2753 | $result = $startValue; |
|
| 2754 | $startValue += $delta; |
|
| 2755 | } |
|
| 2756 | } while ($result != $endValue); |
|
| 2757 | ||
| 2758 | return $result; |
|
| 2759 | } |
|