Przeglądaj źródła

[STAG-7] Use 12 hour time format with am/pm

Vijayakrishnan Krishnan 4 lat temu
rodzic
commit
3b8b2d0481
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      app/Helpers/helpers.php

+ 2 - 2
app/Helpers/helpers.php

@@ -19,7 +19,7 @@ if(!function_exists('friendly_date_time')) {
         if(!$value || empty($value)) return $default;
         try {
             $result = strtotime($value);
-            $result = date("jS M o" . ($includeTime ? ", H:i" : ""), $result);
+            $result = date("jS M o" . ($includeTime ? ", h:ia" : ""), $result);
             return $result;
         }
         catch (Exception $e) {
@@ -33,7 +33,7 @@ if(!function_exists('friendly_time')) {
         if(!$value || empty($value)) return $default;
         try {
             $result = strtotime($value);
-            $result = date("H:i", $result);
+            $result = date("h:ia", $result);
             return $result;
         }
         catch (Exception $e) {