Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 1014 | Rev 1088 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1014 Rev 1019
Line 176... Line 176...
176
	}
176
	}
Line 177... Line 177...
177
 
177
 
178
	private function formaterDateImg($date) {
178
	private function formaterDateImg($date) {
179
		$dateFmt = $date;
179
		$dateFmt = $date;
180
		if ($date == '' || $date == null || $date == '0000-00-00' || $date == '1970-01-01 01:01:01') {
180
		if ($date == '' || $date == null || $date == '0000-00-00' || $date == '1970-01-01 01:01:01') {
181
			$dateFmt = 'inconnue';
-
 
182
		} else {
-
 
183
			$dateFmt = strftime('%e %B %Y', strtotime($date));
181
			return 'inconnue';
-
 
182
		}
-
 
183
		$time = strtotime($date);
-
 
184
		if(!$time) {
-
 
185
			/* TODO: php -r "echo strtotime('1891-00-00 00:00:00');"
-
 
186
			   TODO: fixer le template pour affiche "en l'année X", plutôt que "le X"
-
 
187
			   si FALSE pour avant 1901: problème php
-
 
188
			   On retourne alors simplement l'année.
-
 
189
			   si correction, ne pas oublier modules/popup_illustrations/PopupIllustrations.php */
184
		}
190
			$dateFmt = explode('-', $date);
-
 
191
			return $dateFmt[0];
-
 
192
		}
185
		return $dateFmt;
193
		return strftime('%e %B %Y', strtotime($date));
Line 186... Line 194...
186
	}
194
	}
187
 
195
 
188
	private function formaterNomSci($nom) {
196
	private function formaterNomSci($nom) {