X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fdatetime.php;h=b0279492b1e7e803fbfca6b2a98ca7c9fc78ee37;hb=0df91fd9a2a78d12378fcb7d9f7cba33f33e845e;hp=02250ec073e3c87633b26b3660d0aa51eeb42512;hpb=627c65b49ffafb2c1584bbdf865a5d655d4877d3;p=friendica.git diff --git a/include/datetime.php b/include/datetime.php index 02250ec073..b0279492b1 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -5,8 +5,8 @@ if(! function_exists('timezone_cmp')) { function timezone_cmp($a, $b) { if(strstr($a,'/') && strstr($b,'/')) { - if ($a == $b) return 0; - return ($a < $b) ? -1 : 1; + if ( t($a) == t($b)) return 0; + return ( t($a) < t($b)) ? -1 : 1; } if(strstr($a,'/')) return -1; if(strstr($b,'/')) return 1; @@ -41,9 +41,9 @@ function select_timezone($current = 'America/Los_Angeles') { } else { $city = $ex[0]; - if($continent != 'Miscellaneous') { + if($continent != t('Miscellaneous')) { $o .= ''; - $continent = 'Miscellaneous'; + $continent = t('Miscellaneous'); $o .= ''; } } @@ -171,11 +171,12 @@ function relative_date($posted_date) { // Returns age in years, given a date of birth, // the timezone of the person whose date of birth is provided, // and the timezone of the person viewing the result. -// Why? Bear with me. Let's say I live in Mittagong, Australia. My birthday -// is on New Year's. You live in San Bruno, California. +// Why? Bear with me. Let's say I live in Mittagong, Australia, and my +// birthday is on New Year's. You live in San Bruno, California. // When exactly are you going to see my age increase? -// A: 5:00 AM Dec 31. That's when I start celebrating, and when -// my birthday arrives in your timezone. +// A: 5:00 AM Dec 31 San Bruno time. That's precisely when I start +// celebrating and become a year older. If you wish me happy birthday +// on January 1 (San Bruno time), you'll be a day late. function age($dob,$owner_tz = '',$viewer_tz = '') { if(! intval($dob))