]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/Temporal.php
Add Monolog
[friendica.git] / src / Util / Temporal.php
index 670c273c045cbb6a8f99e5fa79a4d2ca03eb200b..b6392d72fc043f9e853d3e6315390e743c96a100 100644 (file)
@@ -14,9 +14,6 @@ use Friendica\Core\PConfig;
 use Friendica\Core\Renderer;
 use Friendica\Database\DBA;
 
-require_once 'boot.php';
-require_once 'include/text.php';
-
 /**
  * @brief Temporal class
  */
@@ -129,7 +126,7 @@ class Temporal
         */
        public static function getDateofBirthField($dob)
        {
-               $a = get_app();
+               $a = \get_app();
 
                list($year, $month, $day) = sscanf($dob, '%4d-%2d-%2d');
 
@@ -463,11 +460,11 @@ class Temporal
                        $tddate = intval(DateTimeFormat::localNow('j'));
                }
 
-               $str_month = day_translate($mtab[$m]);
+               $str_month = L10n::getDay($mtab[$m]);
                $o = '<table class="calendar' . $class . '">';
                $o .= "<caption>$str_month $y</caption><tr>";
                for ($a = 0; $a < 7; $a ++) {
-                       $o .= '<th>' . mb_substr(day_translate($dn[$a]), 0, 3, 'UTF-8') . '</th>';
+                       $o .= '<th>' . mb_substr(L10n::getDay($dn[$a]), 0, 3, 'UTF-8') . '</th>';
                }
 
                $o .= '</tr><tr>';
@@ -481,7 +478,7 @@ class Temporal
                        $o .= "<td $today>";
                        $day = str_replace(' ', '&nbsp;', sprintf('%2.2d', $d));
                        if ($started) {
-                               if (x($links, $d) !== false) {
+                               if (isset($links[$d])) {
                                        $o .= "<a href=\"{$links[$d]}\">$day</a>";
                                } else {
                                        $o .= $day;