Details
-
Improvement
-
Resolution: Obsolete
-
Medium
-
None
-
4.4.0, 4.5.0alpha, 4.5.0beta1, 4.5.0beta2
-
None
-
Operating System: All
PHP Version: NA
Database and version: NA
Browser (and version): NA
Description
It would be very useful to have the ordinal suffix ('S' in php's date function) as an option on the eZ template language's datetime operator. This can be accomplished with the following patch to lib/ezlocale/classes/ezlocale.php
lib/ezlocale/classes/ezlocale.php @@ -139,7 +139,7 @@ class eZLocale $this->TimePHPArray = array( 'g', 'G', 'h', 'H', 'i', 's', 'U', 'I', 'L $this->DatePHPArray = array( 'd', 'j', 'm', 'n', 'O', 'T', 'U', 'w', 'W $this->DateTimePHPArray = array( 'd', 'j', 'm', 'n', 'O', 'T', 'U', 'w' - 'g', 'G', 'h', 'H', 'i', 's', 'U', 'I' + 'g', 'G', 'h', 'H', 'i', 's', 'S', 'U' $this->TimeArray = preg_replace( '/.+/', '%$0', $this->TimePHPArray ); $this->DateArray = preg_replace( '/.+/', '%$0', $this->DatePHPArray ); $this->DateTimeArray = preg_replace( '/.+/', '%$0', $this->DateTimePHPA
(simply add an 'S' element to DateTimePHPArray)
Steps to reproduce
None