mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 13:06:14 +00:00
make getLongReadableDate() behave like getReadableDate()
This commit is contained in:
parent
52fbe0128f
commit
e67dce277e
|
@ -66,11 +66,22 @@ function getReadableDate($timestamp=0) { /* {{{ */
|
||||||
return date("Y-m-d", $timestamp);
|
return date("Y-m-d", $timestamp);
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function getLongReadableDate($timestamp) { /* {{{ */
|
/**
|
||||||
|
* Return a human readable date and time string
|
||||||
|
*
|
||||||
|
* See note for getReadableDate()
|
||||||
|
*/
|
||||||
|
function getLongReadableDate($timestamp=0) { /* {{{ */
|
||||||
global $settings;
|
global $settings;
|
||||||
if(!is_numeric($timestamp))
|
if($timestamp === 0)
|
||||||
|
$timestamp = time();
|
||||||
|
elseif($timestamp && is_numeric($timestamp))
|
||||||
|
;
|
||||||
|
elseif($timestamp && is_string($timestamp))
|
||||||
$timestamp = strtotime($timestamp);
|
$timestamp = strtotime($timestamp);
|
||||||
if($settings->_datetimeformat)
|
elseif(!is_numeric($timestamp))
|
||||||
|
return '';
|
||||||
|
if($settings->_dateformat)
|
||||||
return date($settings->_datetimeformat, $timestamp);
|
return date($settings->_datetimeformat, $timestamp);
|
||||||
else
|
else
|
||||||
return date("Y-m-d H:i:s", $timestamp);
|
return date("Y-m-d H:i:s", $timestamp);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user