date format can be passed to getConvertDateFormat()

This commit is contained in:
Uwe Steinmann 2023-09-29 14:29:44 +02:00
parent 70a455c422
commit 01fd55832f

View File

@ -33,9 +33,11 @@ function formatted_size($size_bytes) { /* {{{ */
* dd for %d
* This functions returns the converted format
*/
function getConvertDateFormat() { /* {{{ */
function getConvertDateFormat($dateformat) { /* {{{ */
global $settings;
if($settings->_dateformat) {
if(!$dateformat)
$dateformat = $settings->_dateformat;
if($dateformat) {
return str_replace(['y', 'Y', 'm', 'M', 'F', 'd', 'l', 'D'], ['yy', 'yyyy', 'mm', 'M', 'MM', 'dd', 'DD', 'D'], $settings->_dateformat);
} else
return 'yyyy-mm-dd';