PluginProbe ʕ •ᴥ•ʔ
Daily Prayer Time / 2026.05.04
Daily Prayer Time v2026.05.04
2026.05.20 2026.05.11 2026.05.09 2026.05.05 2026.05.04 2026.05.03 2026.04.28 2026.04.28.1 trunk 2019.10.16 2019.11.19 2019.2.16 2019.3.1 2019.4.1 2019.4.5 2019.5.12 2019.5.13 2019.5.14 2019.5.19 2019.5.19.1 2019.5.21 2019.5.30 2019.5.5 2019.5.6 2019.5.7 2019.5.8 2019.5.9 2019.6.10 2019.6.2 2019.6.22 2019.7.10 2019.7.25 2019.8.1 2019.8.4 2019.9.16 2020.04.25 2020.04.26 2020.05.01 2020.05.04 2020.05.08 2020.05.17 2020.07.03 2021.01.10 2021.03.28 2021.07.20 2021.07.23 2021.07.24 2021.07.28 2021.08.01 2021.08.06 2021.08.07 2021.08.10 2021.09.12 2021.09.18 2021.09.23 2021.09.24 2021.10.01 2021.10.02 2021.10.10 2021.10.11 2021.10.15 2021.10.21 2021.10.27 2021.10.29 2022.03.24 2022.04.04 2022.04.14 2022.04.15 2022.04.21 2022.04.22 2022.05.04 2022.09.19 2022.11.14 2022.11.16 2022.12.18 2022.12.20 2023.01.27 2023.02.04 2023.02.09 2023.02.21 2023.03.08 2023.03.17 2023.03.18 2023.03.20 2023.05.04 2023.08.03 2023.08.08.16 2023.08.19 2023.08.19.1 2023.10.13 2023.10.21 2023.11.26 2023.12.28 2023.12.31 2024.03.28 2024.03.29 2024.03.30 2024.04.18 2024.04.20 2024.04.22 2024.04.26 2024.08.26 2024.09.12 2024.09.14 2024.09.17 2024.12.29 2024.12.30 2025.01.02 2025.01.17 2025.02.02 2025.03.04 2025.03.06 2025.03.08 2025.03.15 2025.03.20 2025.03.26 2025.03.27 2025.04.03 2025.06.16 2025.06.29 2025.07.15 2025.08.09 2025.10.26 2026.04.26
daily-prayer-time-for-mosques / Views / TimetablePrinter.php
daily-prayer-time-for-mosques / Views Last commit date
Tabs 1 month ago DSTemplate.php 1 month ago DailyTimetablePrinter.php 1 month ago DptApiDoc.php 2 months ago HelpsAndTips.php 2 months ago MonthlyTimetablePrinter.php 2 months ago TimetablePrinter.php 1 month ago dptWidgetForm.php 4 years ago horizontal-div.php 1 month ago widget-admin.php 1 month ago
TimetablePrinter.php
715 lines
1 <?php
2
3 require_once(__DIR__ . '/../Models/HijriDate.php');
4 require_once(__DIR__ . '/../Models/DPTHelper.php');
5
6 class TimetablePrinter
7 {
8 protected $prayerLocal = array(
9 "fajr" => "Fajr",
10 "sunrise" => "Sunrise",
11 "ishraq" => "Ishraq",
12 "zuhr" => "Zuhr",
13 "asr" => "Asr",
14 "maghrib" => "Maghrib",
15 "isha" => "Isha",
16 "zawal" => "Zawal"
17 );
18
19 protected $headersLocal = array(
20 "prayer" => "Prayer",
21 "begins" => "Begins",
22 "iqamah" => "Iqamah",
23 "standard" => "Standard",
24 "hanafi" => "Hanafi",
25 "fast_begins" => "Suhoor End",
26 "fast_ends" => "Iftar Start",
27 "jumuah" => "Jumuah"
28 );
29
30 protected $numbersLocal = array(
31 0 => '0',
32 1 => '1',
33 2 => '2',
34 3 => '3',
35 4 => '4',
36 5 => '5',
37 6 => '6',
38 7 => '7',
39 8 => '8',
40 9 => '9'
41 );
42
43 protected $monthsLocal = array(
44 'january' => 'January',
45 'february' => 'February',
46 'march' => 'March',
47 'april' => 'April',
48 'may' => 'May',
49 'june' => 'June',
50 'july' => 'July',
51 'august' => 'August',
52 'september' => 'September',
53 'october' => 'October',
54 'november' => 'November',
55 'december' => 'December'
56 );
57
58
59 /** @var array */
60 protected $timesLocal = array(
61 'date' => 'Date',
62 'day' => 'Day',
63 'minute' => 'Minute',
64 'minutes' => 'Minutes',
65 'hour' => 'Hour',
66 'hours' => 'Hours',
67 'second' => 's',
68 'iqamah update' => 'IQAMAH CHANGES:',
69 'next prayer' => 'Next ...'
70 );
71
72 /** @var string */
73 protected $tableClass;
74
75 /** @var array */
76 protected $localPrayerNames;
77
78 /** @var array */
79 protected $localHeaders;
80
81 /** @var array */
82 protected $localNumbers;
83
84 /** @var array */
85 protected $localTimes;
86
87 /** @var HijriDate */
88 protected $hijriDate;
89
90 /** @var string */
91 protected $hijridateString;
92
93 /** $var bool */
94 protected $isVertical = false;
95
96 /** $var bool */
97 protected $isHorizontal = false;
98
99 /** @var DPTHelper */
100 private $dptHelper;
101
102 public function __construct()
103 {
104 $this->localPrayerNames = $this->getLocalPrayerNames();
105 $this->localHeaders = $this->getLocalHeaders();
106 $this->localNumbers = $this->getLocalNumbers();
107 $this->localTimes = $this->getLocalTimes();
108 $this->dptHelper = new DPTHelper();
109 $this->hijriDate = new HijriDate();
110 $this->hijridateString = $this->hijriDate->getDate(date("d"), date("m"), date("Y"), true, true);
111 }
112
113 public function getTableClass()
114 {
115 return get_option('hideTableBorder');
116 }
117
118 public function getLocalPrayerNames($forAdmin=false, $enableJumuah=false)
119 {
120 $prayers_local = get_option('prayersLocal');
121 $localPrayerName = $prayers_local;
122
123 if ( empty($prayers_local)) {
124 $localPrayerName = $this->prayerLocal;
125 }
126
127 if (is_array($localPrayerName)) {
128 $localPrayerName = array_map( 'sanitize_text_field', $localPrayerName);
129 $localPrayerName = array_map('stripslashes', $localPrayerName);
130 }
131
132 if (!isset($localPrayerName['ishraq'])) {
133 $localPrayerName['ishraq'] = 'Israq';
134 }
135
136 return $localPrayerName;
137 }
138
139 public function getLocalHeaders()
140 {
141 $headers_local = get_option('headersLocal');
142
143 if ( empty($headers_local)) {
144 return $this->headersLocal;
145 } elseif (count($headers_local) != count($this->headersLocal)) {
146 delete_option( 'headersLocal' );
147 return $this->headersLocal;
148 }
149
150 if (is_array($headers_local)) {
151 $headers_local = array_map( 'sanitize_text_field', $headers_local);
152 $headers_local = array_map('stripslashes', $headers_local);
153 }
154
155 return $headers_local;
156 }
157
158 public function getLocalMonths()
159 {
160 $monthsLocal = get_option('monthsLocal');
161
162 if ( empty( $monthsLocal )) {
163 $monthsLocal = $this->monthsLocal;
164 }
165
166 if ( $this->isRamadan() ) {
167 $monthsLocal['ramadan'] = 'Ramadan';
168 } else {
169 unset( $monthsLocal['ramadan'] );
170 }
171
172 if (is_array($monthsLocal)) {
173 $monthsLocal = array_map( 'sanitize_text_field', $monthsLocal);
174 $monthsLocal = array_map('stripslashes', $monthsLocal);
175 }
176
177 return $monthsLocal;
178 }
179
180 public function getLocalNumbers()
181 {
182 $numbers_local = get_option('numbersLocal');
183
184 if (is_array($numbers_local)) {
185 $numbers_local = array_map( 'sanitize_text_field', $numbers_local);
186 }
187
188 return empty($numbers_local) ? $this->numbersLocal : $numbers_local;
189 }
190
191
192 public function getLocalTimes()
193 {
194 $times = get_option('timesLocal');
195 if (is_array($times)) {
196 $times = array_map( 'sanitize_text_field', $times);
197 }
198
199 if ( empty($times)) {
200 return $this->timesLocal;
201 } elseif (count($times) != count($this->timesLocal)) {
202 delete_option( 'timesLocal' );
203 return $this->timesLocal;
204 }
205
206 return $times;
207 }
208
209 public function getLocalTimesKeys()
210 {
211 return array_keys($this->timesLocal);
212 }
213
214 public function setVertical($value=true)
215 {
216 $this->isVertical = $value;
217 }
218
219 public function setHorizontal($value=true)
220 {
221 $this->isHorizontal = $value;
222 }
223
224 /**
225 * @param string $mysqlDate
226 * @param string $format
227 * @return string
228 */
229 public function formatDate($mysqlDate, $format=null)
230 {
231 return $this->dptHelper->formatDate($mysqlDate, $format);
232 }
233
234 /**
235 * @param string $mysqlDate
236 * @return string
237 */
238 public function formatDateForPrayer($mysqlDate, $imsak=false)
239 {
240 $phpDate = strtotime($mysqlDate);
241 if ($imsak) {
242 $phpDate = $phpDate - ((int)get_option('imsaq') * 60);
243 }
244 $wpDate = date(get_option('time_format'), $phpDate);
245
246 $result = str_split($wpDate);
247 $intlDate = '';
248 $this->localNumbers = $this->getLocalNumbers();
249
250 foreach ($result as $char) {
251 if (array_key_exists($char, $this->localNumbers)) {
252 $intlDate .= $this->localNumbers[$char];
253 } else {
254 $intlDate .= $char;
255 }
256 }
257
258 return $intlDate;
259 }
260
261 public function formatDateForPrayer24Hour($mysqlDate, $imsak=false)
262 {
263 $phpDate = strtotime($mysqlDate);
264 if ($imsak) {
265 $phpDate = $phpDate - ((int)get_option('imsaq') * 60);
266 }
267 return date('H:i', $phpDate);
268 }
269
270 public function getIntlNumber($numbers)
271 {
272 $intlDate = '';
273
274 $this->localNumbers = $this->getLocalNumbers();
275 $result = str_split($numbers);
276 foreach ($result as $number) {
277 $intlDate .= $this->localNumbers[$number];
278 if (empty($this->localNumbers[$number]) && $number !== '0') {
279 $intlDate .= $number;
280 }
281 }
282
283 return $intlDate;
284 }
285
286 /**
287 * @param string $month
288 * @param string $day
289 * @return string
290 */
291 protected function getClass($month, $day, $weekday='')
292 {
293 if ($day == user_current_time('j') && $month == user_current_time('m')){
294 return "class = highlight";
295 } elseif($weekday=='Friday') {
296 return "class = Fri";
297 }
298 }
299
300 /**
301 * @param array $data
302 * @param bool $azanOnly
303 * @return string|null
304 */
305 protected function getFastingTdWithData($data, $azanOnly=null, $imsaq=false)
306 {
307 $html = "";
308
309 if ($this->isRamadan() && ! $azanOnly && $imsaq) {
310 $html = "<td class='fasting'>" . $this->formatDateForPrayer($data, $imsaq) . "</td>";
311 } elseif ($this->isRamadan() && $imsaq) {
312 $html = "<td class='fasting'>" . $this->formatDateForPrayer($data, $imsaq). "</td>";
313 $html .= "<td>" . $this->formatDateForPrayer($data). "</td>";
314
315 } elseif ($this->isRamadan() && ! $imsaq) {
316 $html = "<td class='fasting'>" . $this->formatDateForPrayer($data). "</td>";
317 } elseif ($this->isRamadan() && ! $azanOnly && $imsaq) {
318 $html = "<td class='fasting'>" . $this->formatDateForPrayer($data). "</td>";
319 } elseif ($azanOnly) {
320 $html = "<td>" . $this->formatDateForPrayer($data). "</td>";
321 }
322
323 return $html;
324 }
325
326 /**
327 * @param array $row
328 * @param bool $displayDates
329 * @param bool $apiCall
330 * @return string
331 */
332 public function getNextIqamahTime(array $row, $displayDates=false, $apiCall=false)
333 {
334 $diff = $this->getNextIqamahTimeDiff($row);
335 $nextPrayer = $this->getNextPrayer($row);
336
337 if ($apiCall) {
338 $nextPrayerTime = $this->getNextPrayerActualTime($row, $nextPrayer);
339 $nextAzanTime = $this->getNextAzanActualTime($row, $nextPrayer);
340
341 return [
342 'prayerName' => $nextPrayer,
343 'timeLeft' => $diff,
344 'iqamahTime' => $nextPrayerTime,
345 'azanTime' => $nextAzanTime
346 ];
347 }
348
349 $hijriDate = '';
350 if($row['displayHijriDate']) {
351 $hijriDate = $this->hijriDate->getDate(date("d"), date("m"), date("Y"), true, true);
352 }
353
354 $printDates = '';
355 if ($displayDates) {
356 $printDates = '<div>
357 <span class="scDate">
358 ' . date_i18n( get_option( 'date_format' ) ) . '
359 </span>
360 <span class="scHijri">
361 ' . $hijriDate . '
362 </span>';
363 }
364
365 return
366 $printDates . '
367 <div class="dptScNextPrayer">
368 <span class="green">
369 <span class="nextPrayer">' . $this->getHeading($row, $nextPrayer). '</span> ' .
370 $this->getTimeLeftString($diff, $row);
371 }
372
373 protected function getTimeLeftString($nextIqamah, $row)
374 {
375 $timeLeftText = '';
376 $minLeftText = '';
377 if ($nextIqamah) {
378 $timeLeftText = $this->getLocalizedNumber( $nextIqamah ) .':00';
379 $minLeftText = $this->localTimes["minute"];
380 if ($nextIqamah > 60) {
381 $hours = $nextIqamah / 60;
382 $hours = (int)$hours;
383 $mins = $nextIqamah % 60;
384 $mins = (int)$mins;
385 $timeLeftText = $this->getLocalizedNumber( $hours ) .' '.$this->localTimes["hour"] .' '
386 . $this->getLocalizedNumber( $mins ) .' '
387 .$this->localTimes["minute"];
388 }
389
390 }
391 return $this->getNextPrayerTime($row, $nextIqamah, $timeLeftText, $minLeftText);
392 }
393
394 protected function getNextIqamahTimeDiff(array $row)
395 {
396 $jamahTime = $this->getJamahTime( $row );
397 $now = current_time( 'H:i');
398 foreach ($jamahTime as $key=>$jamah) {
399 if ($jamah > $now ) {
400 if ($key == 'Sunrise') {
401 $this->localPrayerNames[lcfirst($key)] . ':';
402 }
403 if ($key == 'Zuhr' && $this->isJumahDisplay($row)) {
404 $this->localPrayerNames[lcfirst($key)] . ':';
405 }
406 $toTime = strtotime( $jamah );
407 $fromTime = strtotime( $now );
408 $diff = round(abs($toTime - $fromTime)/60,2);
409
410 return $diff;
411 }
412 }
413 }
414
415 /**
416 * @param $row
417 *
418 * @return string
419 */
420 protected function getNextPrayer($row)
421 {
422 return $this->dptHelper->getNextPrayer($row);
423 }
424
425 protected function getHeading($dbRow, $nextPrayer)
426 {
427 $iqamah = ($nextPrayer == 'sunrise') ? '' : $this->localHeaders['iqamah'];
428 if ($nextPrayer == 'zawal') {
429 return $this->localPrayerNames['zuhr'].' '. $iqamah;
430 }
431 if ($nextPrayer == 'ishraq') {
432 return $this->localPrayerNames['ishraq'];
433 }
434 if ($nextPrayer == 'jumuah') {
435 return $this->localHeaders['jumuah'];
436 }
437 if ( is_null($nextPrayer)) {
438 return $this->localPrayerNames['fajr'].' '. $iqamah;
439 }
440 if ( $this->isJumahDisplay($dbRow) ) {
441 return $this->getLocalHeaders()['jumuah'];
442 }
443
444 return $this->localPrayerNames[$nextPrayer] .' '. $iqamah;
445 }
446
447 protected function getNextPrayerTime($dbRow, $nextIqamah, $timeLeftText, $minLeftText)
448 {
449 $nextPrayer = $this->getNextPrayer($dbRow);
450
451 if ($nextPrayer == 'zawal') {
452 $nextPrayer = 'zuhr';
453 }
454
455 if ($nextPrayer == 'jumuah') {
456 $nextPrayerTime = $dbRow['zuhr_jamah'];
457 } elseif ($nextPrayer == 'ishraq') {
458 $nextPrayerTime = $this->dptHelper->getIshraqTime($dbRow['sunrise']);
459 } else {
460 $key = ($nextPrayer == 'sunrise') ? $nextPrayer : strtolower($nextPrayer.'_jamah');
461
462 if (isset($dbRow[$key])) {
463 $nextPrayerTime = $dbRow[$key];
464 }
465
466 if (is_null($nextPrayerTime)) {
467 $nextPrayerTime = $dbRow['nextFajr'];
468 }
469 }
470 $nextPrayerTime24Hours = $this->formatDateForPrayer24Hour($nextPrayerTime);
471
472 return
473 '
474 <input type="hidden" id="timezoneOffset" value="' . get_option('gmt_offset') .'">
475 <h2 id="dptScTimeCountDown" style="display: none">' . $nextPrayerTime24Hours. '</h2>
476 <h2 class="dptScTime">
477 <input type="hidden" value="' . htmlentities($this->getTimesLocalJson()) . '" id="localizedNumbers">
478 <input type="hidden" value="' . htmlentities($this->getTimesLocalJson()) . '" id="localizedTimes"> ' .
479 $this->formatDateForPrayer($nextPrayerTime). '
480 </h2>
481 <span class="timeLeftCountDown timeLeft '.$this->getIqamahClass( $nextIqamah ).'">
482 '. $timeLeftText .'
483 </span>
484 </div>';
485 }
486
487 /**
488 * @param array $row
489 *
490 * @return array
491 */
492 protected function getJamahTime(array $row)
493 {
494 $jamahTimes = array( $row["fajr_jamah"], $row['sunrise'], $row["zuhr_jamah"], $row["asr_jamah"], $row["maghrib_jamah"], $row["isha_jamah"]);
495 $jamahNames = array("fajr", "sunrise", "zuhr", "asr", "maghrib", "isha");
496 return array_combine( $jamahNames, $jamahTimes );
497
498 }
499
500 protected function getNextPrayerActualTime(array $row, $nextPrayer)
501 {
502 if ($nextPrayer == 'zawal' || $nextPrayer == 'sunrise') {
503 return $row['sunrise'];
504 }
505
506 $key = strtolower($nextPrayer . '_jamah');
507
508 if (isset($row[$key])) {
509 return $row[$key];
510 }
511
512 return null;
513 }
514
515 protected function getNextAzanActualTime(array $row, $nextPrayer)
516 {
517 if ($nextPrayer == 'zawal' || $nextPrayer == 'sunrise') {
518 return $row['sunrise'];
519 }
520
521 $key = strtolower($nextPrayer . '_begins');
522
523 if (isset($row[$key])) {
524 return $row[$key];
525 }
526
527 return null;
528 }
529
530 /**
531 * @param array $row
532 *
533 * @return array
534 */
535 protected function getAzanTime(array $row)
536 {
537 $jamahTimes = array( $row["fajr_begins"], $row['sunrise'], $row["zuhr_begins"], $row["asr_begins"], $row["maghrib_begins"], $row["isha_begins"]);
538 $jamahNames = array_keys($this->prayerLocal);
539 $jamahNames = array_filter($jamahNames, function($key) {
540 return !in_array($key, ['zawal', 'ishraq']);
541 }); // remove zawal and ishraq (they have no begins/jamah)
542 return array_combine( $jamahNames, $jamahTimes );
543 }
544
545 /**
546 * @param $numbers
547 *
548 * @return string
549 */
550 public function getLocalizedNumber($numbers)
551 {
552 $numbers = str_split( $numbers );
553 $localNumber = "";
554 foreach ($numbers as $number) {
555 $localNumber .= $this->localNumbers[$number];
556 }
557
558 return $localNumber;
559 }
560
561 /**
562 * @param $number
563 *
564 * @return string
565 */
566 protected function getIqamahClass($number)
567 {
568 return $this->dptHelper->getIqamahClass($number);
569 }
570
571 protected function getJamahChange(array $row, $isDigitalScreen=false, $orientation="")
572 {
573 $style = null;
574
575 if ($this->isVertical && ! $isDigitalScreen) {
576 $style = "style='display: block;'";
577 }
578
579 $timeClass = "";
580 $digitalScreenClass = "";
581
582 if ($isDigitalScreen) {
583 $timeClass = "class='x-time-change bg-dark'";
584 $digitalScreenClass = "jamahChanges-" . $orientation;
585
586 }
587
588 $timeRelated = $this->getLocalTimes();
589
590 $print =
591 "<span class='jamahChanges " . $digitalScreenClass . "'>
592 <span class='x-time-text'>"
593 . stripslashes($timeRelated['iqamah update']) .
594 "</span>";
595
596 $prayerNames = $this->getLocalPrayerNames();
597
598 foreach($row['jamah_changes'] as $key=>$time) {
599 if (! empty($key) ){
600 $prayer = explode('_', $key);
601 if ( $this->tomorrowIsFriday() ) {
602 $prayerNames['zuhr'] = $this->getLocalHeaders()['jumuah'];
603 }
604 $print .= "<span " . $style . $timeClass ." >" . $prayerNames[$prayer[0]] . ": " . $this->getTimeForIqamahUpdate($prayerNames[$prayer[0]], $time) . "</span>";
605 }
606 }
607 $print .= "</span>";
608
609 return $print;
610 }
611
612 private function getTimeForIqamahUpdate($key, $time)
613 {
614 $jumuahTime = get_option('jumuah1');
615 if ( $key === $this->getLocalHeaders()['jumuah'] && $jumuahTime) {
616 return $jumuahTime;
617 }
618 return $this->formatDateForPrayer($time);
619 }
620
621 protected function todayIsFriday()
622 {
623 return $this->dptHelper->todayIsFriday();
624 }
625
626 protected function tomorrowIsFriday()
627 {
628 return $this->dptHelper->tomorrowIsFriday();
629 }
630
631 public function getHijriDate($day, $month, $year, $dbRow, $forMonth=false)
632 {
633 return $this->dptHelper->getHijriDate($day, $month, $year, $dbRow, $forMonth);
634 }
635
636 public function isJumahDisplay($dbRow)
637 {
638 return $this->dptHelper->isJumahDisplay($dbRow);
639 }
640
641 private function isSunset($dbRow, $forMonth=false)
642 {
643 return $this->dptHelper->isSunset($dbRow, $forMonth);
644 }
645
646 /**
647 * dim display overnight between Isha and Fajr start
648 */
649 protected function canDimOvernight($dbRow, $disableOvernightDim=false)
650 {
651 return $this->dptHelper->canDimOvernight($dbRow, $disableOvernightDim);
652 }
653
654 /**
655 * set khutbah dimming time on friday between sunrise and Asr
656 */
657 protected function getKhutbahDim(array $dbRow): int
658 {
659 return $this->dptHelper->getKhutbahDim($dbRow);
660 }
661
662 /**
663 * get diming time for taraweeh during ramadan after isha and before fajr
664 */
665 protected function getTaraweehDim(array $dbRow): int
666 {
667 return $this->dptHelper->getTaraweehDim($dbRow);
668 }
669
670 protected function getNextPrayerClass($prayerName, $row, $isFajr=false)
671 {
672 return $this->dptHelper->getNextPrayerClass($prayerName, $row, $isFajr);
673 }
674
675 public function isRamadan()
676 {
677 return $this->dptHelper->isRamadan();
678 }
679
680 public function getJumuahTimesArray($isVertical = false, $separator = " | ")
681 {
682 $class = 'dsJumuah';
683 if ($isVertical) {
684 $class = 'dsJumuah-vertical';
685 }
686 $jumuahText = [];
687 $jumuahArray = [get_option('jumuah1'), get_option('jumuah2'), get_option('jumuah3')];
688 $jumuahArray = array_filter($jumuahArray);
689 foreach ($jumuahArray as $jumuah) {
690 $jumuahText[] = '<span class="' . $class . '">' . $this->formatDateForPrayer($jumuah) . '</span>';
691 }
692 return implode($separator, $jumuahText);
693 }
694
695 public function getTimesLocalJson(): string
696 {
697 return
698 json_encode([
699 'minute' => $this->getLocalTimes()['minute'] ?? 'minute',
700 'minutes' => $this->getLocalTimes()['minutes'],
701 'hour' => $this->getLocalTimes()['hour'] ?? 'hour',
702 'hours' => $this->getLocalTimes()['hours'],
703 'second' => $this->getLocalTimes()['second'],
704 ],
705 JSON_UNESCAPED_UNICODE);
706 }
707
708 public function getNumbersLocalJson(): string
709 {
710 $localNumbers = $this->getLocalNumbers();
711 $localNumbers = array_combine(array_keys($localNumbers), $localNumbers);
712 return json_encode($localNumbers, JSON_UNESCAPED_UNICODE);
713 }
714 }
715