mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +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);
|
||||
} /* }}} */
|
||||
|
||||
function getLongReadableDate($timestamp) { /* {{{ */
|
||||
/**
|
||||
* Return a human readable date and time string
|
||||
*
|
||||
* See note for getReadableDate()
|
||||
*/
|
||||
function getLongReadableDate($timestamp=0) { /* {{{ */
|
||||
global $settings;
|
||||
if(!is_numeric($timestamp))
|
||||
if($timestamp === 0)
|
||||
$timestamp = time();
|
||||
elseif($timestamp && is_numeric($timestamp))
|
||||
;
|
||||
elseif($timestamp && is_string($timestamp))
|
||||
$timestamp = strtotime($timestamp);
|
||||
if($settings->_datetimeformat)
|
||||
elseif(!is_numeric($timestamp))
|
||||
return '';
|
||||
if($settings->_dateformat)
|
||||
return date($settings->_datetimeformat, $timestamp);
|
||||
else
|
||||
return date("Y-m-d H:i:s", $timestamp);
|
||||
|
|
Loading…
Reference in New Issue
Block a user