@@ 700-706 (lines=7) @@ | ||
697 | case 'D': |
|
698 | $retVal = intval($difference); |
|
699 | break; |
|
700 | case 'M': |
|
701 | $retVal = intval($endMonths - $startMonths) + (intval($endYears - $startYears) * 12); |
|
702 | // We're only interested in full months |
|
703 | if ($endDays < $startDays) { |
|
704 | --$retVal; |
|
705 | } |
|
706 | break; |
|
707 | case 'Y': |
|
708 | $retVal = intval($endYears - $startYears); |
|
709 | // We're only interested in full months |
|
@@ 729-738 (lines=10) @@ | ||
726 | $retVal = $endDays - $startDays; |
|
727 | } |
|
728 | break; |
|
729 | case 'YM': |
|
730 | $retVal = intval($endMonths - $startMonths); |
|
731 | if ($retVal < 0) { |
|
732 | $retVal += 12; |
|
733 | } |
|
734 | // We're only interested in full months |
|
735 | if ($endDays < $startDays) { |
|
736 | --$retVal; |
|
737 | } |
|
738 | break; |
|
739 | case 'YD': |
|
740 | $retVal = intval($difference); |
|
741 | if ($endYears > $startYears) { |