]> git.mxchange.org Git - friendica-addons.git/commitdiff
Replace datetime functions by Temporal methods
authorHypolite Petovan <mrpetovan@gmail.com>
Sat, 3 Feb 2018 17:31:33 +0000 (12:31 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Sat, 3 Feb 2018 17:31:33 +0000 (12:31 -0500)
forumdirectory/forumdirectory.php

index 03e770022072919e8262d6fc9d48294c0565c228..a72c45ba49026885993a9b388ccc0b5ddf94061a 100644 (file)
@@ -13,6 +13,7 @@ use Friendica\Core\Config;
 use Friendica\Core\L10n;
 use Friendica\Database\DBM;
 use Friendica\Model\Profile;
+use Friendica\Util\Temporal;
 
 require_once 'boot.php';
 require_once 'include/dba.php';
@@ -149,7 +150,7 @@ function forumdirectory_content(&$a)
                                $details .= $rr['country-name'];
                        }
 
-                       if (strlen($rr['dob']) && ($years = age($rr['dob'], $rr['timezone'], '')) != 0) {
+                       if (strlen($rr['dob']) && ($years = Temporal::getAgeByTimezone($rr['dob'], $rr['timezone'], '')) != 0) {
                                $details .= '<br />' . L10n::t('Age: ') . $years;
                        }