@@ 704-710 (lines=7) @@ | ||
701 | case 'D': |
|
702 | $retVal = (int) $difference; |
|
703 | break; |
|
704 | case 'M': |
|
705 | $retVal = (int) ($endMonths - $startMonths) + ((int) ($endYears - $startYears) * 12); |
|
706 | // We're only interested in full months |
|
707 | if ($endDays < $startDays) { |
|
708 | --$retVal; |
|
709 | } |
|
710 | break; |
|
711 | case 'Y': |
|
712 | $retVal = (int) ($endYears - $startYears); |
|
713 | // We're only interested in full months |
|
@@ 733-742 (lines=10) @@ | ||
730 | $retVal = $endDays - $startDays; |
|
731 | } |
|
732 | break; |
|
733 | case 'YM': |
|
734 | $retVal = (int) ($endMonths - $startMonths); |
|
735 | if ($retVal < 0) { |
|
736 | $retVal += 12; |
|
737 | } |
|
738 | // We're only interested in full months |
|
739 | if ($endDays < $startDays) { |
|
740 | --$retVal; |
|
741 | } |
|
742 | break; |
|
743 | case 'YD': |
|
744 | $retVal = (int) $difference; |
|
745 | if ($endYears > $startYears) { |