Merged patch #457984 (Localised dates in dump and db stats) thanks to Michal Cihar

This commit is contained in:
Loïc Chapeaux
2001-09-05 21:00:25 +00:00
parent aade7fd1c5
commit 6b93b2c991
30 changed files with 182 additions and 2 deletions

View File

@@ -845,6 +845,26 @@ window.parent.frames['nav'].location.replace('<?php echo $reload_url; ?>');
} // end of the 'check_reserved_words' function
/**
* Writes localised date
*
* @param timestamp time
*/
function localised_date($timestamp = -1)
{
global $datefmt, $month, $day_of_week;
if ($timestamp == -1) {
$timestamp = time();
}
$date = ereg_replace('%[aA]', $day_of_week[(int)strftime('%w',$timestamp)], $datefmt);
$date = ereg_replace('%[bB]', $month[(int)strftime('%m',$timestamp)], $date);
return strftime($date, $timestamp);
} // end of the 'localised_date()' function
/* ----- Functions used to display records returned by a sql query ----- */