Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 1017 → Rev 1018

/trunk/modules/popup_illustrations/PopupIllustrations.php
51,12 → 51,17
private function formaterDateImg($date) {
$dateFmt = $date;
if ($date == '0000-00-00' || $date == '1970-01-01 01:01:01') {
$dateFmt = 'inconnue';
} else {
$dateFmt = strftime('%e %B %Y', strtotime($date));
return 'inconnue';
}
return $dateFmt;
$time = strtotime($date);
if(!$time) {
/* TODO: php -r "echo strtotime('1891-00-00 00:00:00');"
si FALSE pour avant 1901: problème php
On retourne alors simplement l'année. */
$dateFmt = explode('-', $date);
return $dateFmt[0];
}
return strftime('%e %B %Y', strtotime($date));
}
 
}
?>