developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 9 years ago

Closed 9 years ago

#1432 closed bug (fixed)

date_format should support timestamp as parameter

Reported by: foxmask Owned by:
Priority: normal Milestone: Jelix 1.1.12
Component: jelix:plugins:tpl Version: 1.2.6
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

here is the complet description :

http://jelix.org/forums/forum/5-jelix-utilisation-et-developpement/posts/8883-8883-plugins-de-template-modificateur-date_format#p8883

and it seems to not work as expected.

at least we should do something like that

	if($string!=''){
           $time = strtotime($string);
           if ($time == -1 || $time === false) $time = time(); 
           return strftime($format,$time);
	}

Change History (2)

comment:1 Changed 9 years ago by foxmask

  • Milestone set to Jelix 1.2.7

comment:2 Changed 9 years ago by laurentj

  • Milestone changed from Jelix 1.2.7 to Jelix 1.1.12
  • Resolution set to fixed
  • Status changed from new to closed
  • Summary changed from date_format does not return the expected result to date_format should support timestamp as parameter
Note: See TracTickets for help on using tickets.