Forráskód Böngészése

friendly date est

= 3 éve
szülő
commit
0ef2af023e

+ 19 - 0
app/Helpers/helpers.php

@@ -149,6 +149,25 @@ if(!function_exists('get_current_date')) {
 }
 
 
+if(!function_exists('friendly_date_est')) {
+    function friendly_date_est($value, $default = '-') {
+
+        if(!$value || empty($value)) return $default;
+        try {
+
+            $realTimezone = resolve_timezone('EASTERN');
+            $date = new DateTime($value);
+            $date->setTimezone(new DateTimeZone($realTimezone));
+
+            return $date->format("m/d/y");
+
+        }
+        catch (Exception $e) {
+            return $e->getMessage();
+        }
+    }
+}
+
 
 if(!function_exists('friendly_date_time')) {
     function friendly_date_time($value, $includeTime = true, $default = '-', $long_year=false) {

+ 2 - 2
resources/views/app/practice-management/remote-monitoring-row-markup-by-pro-type.blade.php

@@ -19,7 +19,7 @@
             <span class="sort-data">{{$iPatient->most_recent_cellular_bp_sbp_mm_hg ?: '-'}}</span>/{{$iPatient->most_recent_cellular_bp_dbp_mm_hg ?: '-'}}
             @if($iPatient->most_recent_cellular_bp_measurement_at)
                 <span class="text-sm text-secondary text-nowrap ml-1"
-                      title="{{friendly_date_time($iPatient->most_recent_cellular_bp_measurement_at)}}">({{$iPatient->most_recent_cellular_bp_measurement_at}})</span>
+                      title="{{friendly_date_time($iPatient->most_recent_cellular_bp_measurement_at)}}">({{friendly_date_est($iPatient->most_recent_cellular_bp_measurement_at)}})</span>
             @endif
         </div>
     </td>
@@ -28,7 +28,7 @@
             <span class="sort-data">{{$iPatient->most_recent_cellular_weight_value ? round($iPatient->most_recent_cellular_weight_value, 1) : '-'}}</span>
             @if($iPatient->most_recent_cellular_weight_measurement_at)
                 <span class="text-sm text-secondary text-nowrap ml-1"
-                      title="{{friendly_date_time($iPatient->most_recent_cellular_weight_measurement_at)}}">({{friendly_date($iPatient->most_recent_cellular_weight_measurement_at)}})</span>
+                      title="{{friendly_date_time($iPatient->most_recent_cellular_weight_measurement_at)}}">({{friendly_date_est($iPatient->most_recent_cellular_weight_measurement_at)}})</span>
             @endif
         </div>
     </td>