|
@@ -80,6 +80,25 @@ if(!function_exists('friendly_date_time_short_with_tz_from_timestamp')) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+if(!function_exists('friendly_date_time_short_with_tz_from_timestamp_divide1000')) {
|
|
|
+ function friendly_date_time_short_with_tz_from_timestamp_divide1000($value, $tz='UTC', $default = '-') {
|
|
|
+
|
|
|
+ if(!$value || empty($value)) return $default;
|
|
|
+ try {
|
|
|
+ $value = (floor($value / 1000));
|
|
|
+ $realTimezone = resolve_timezone($tz);
|
|
|
+ $date = new DateTime("@$value");
|
|
|
+ $date->setTimezone(new DateTimeZone($realTimezone));
|
|
|
+
|
|
|
+ return $date->format("m/d/y, h:iA");
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (Exception $e) {
|
|
|
+ return $e->getMessage();
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
if(!function_exists('friendly_date')) {
|
|
|
function friendly_date($value) {
|
|
|
if(!$value || empty($value)) return '';
|