diff options
| author | fisharebest <fisharebest@gmail.com> | 2011-11-22 15:19:51 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2011-11-22 15:19:51 +0000 |
| commit | a8acedac54fa008d3dbf3202c630045b8964726e (patch) | |
| tree | 0c6da194e77a8e697b91b4946424955f841de02e /library | |
| parent | f115b3fc0e74718295dda443a74884865f69a7e8 (diff) | |
| download | webtrees-a8acedac54fa008d3dbf3202c630045b8964726e.tar.gz webtrees-a8acedac54fa008d3dbf3202c630045b8964726e.tar.bz2 webtrees-a8acedac54fa008d3dbf3202c630045b8964726e.zip | |
Translate numbers
Diffstat (limited to 'library')
| -rw-r--r-- | library/WT/Date.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/WT/Date.php b/library/WT/Date.php index 15358748a7..0cd85de910 100644 --- a/library/WT/Date.php +++ b/library/WT/Date.php @@ -299,11 +299,13 @@ class WT_Date { // Calculate the number of full years between two events. // Return the result as either a number of years (for indi lists, etc.) static function GetAgeYears($d1, $d2=null, $warn_on_negative=true) { - if (!is_object($d1)) return; - if (!is_object($d2)) + if (!is_object($d1)) { + return ''; + } elseif (!is_object($d2)) { return $d1->date1->GetAge(false, WT_CLIENT_JD, $warn_on_negative ); - else + } else { return $d1->date1->GetAge(false, $d2->MinJD(), $warn_on_negative); + } } // Calculate the years/months/days between two events |
