|
@@ -28,6 +28,20 @@ if(!function_exists('friendly_date_time')) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+if(!function_exists('friendly_date_time_short')) {
|
|
|
+ function friendly_date_time_short($value, $includeTime = true, $default = '-') {
|
|
|
+ if(!$value || empty($value)) return $default;
|
|
|
+ try {
|
|
|
+ $result = strtotime($value);
|
|
|
+ $result = date("m/d/y" . ($includeTime ? ", h:ia" : ""), $result);
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
+ catch (Exception $e) {
|
|
|
+ return $value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
if(!function_exists('friendly_time')) {
|
|
|
function friendly_time($value, $default = '-') {
|
|
|
if(!$value || empty($value)) return $default;
|