[TYPO3-english] date change

Jigal van Hemert jigal.van.hemert at typo3.org
Fri Jul 29 19:42:56 CEST 2016


Hi,

On 26/07/2016 19:56, iam li wrote:
> I am trying to display the date (in french) as such, if it is the first
> day of the month, I would like to add "er" after "1" giving "1er". There
> is no other changes needed.
>
>
> This is what is have now, "
> lib.navigation.footer.10.data = page:lastUpdated
> lib.navigation.footer.10.strftime = %e %B %Y
> lib.navigation.footer.10.wrap = <p>Dernier changement�:�|</p>
> "
>
> I would like something like:
> "
> lib.navigation.footer.10.data = page:lastUpdated
> if (%e==1){ then %e=1er }
> lib.navigation.footer.10.strftime = %e %B %Y
> lib.navigation.footer.10.wrap = <p>Dernier changement�:�|</p>
> "
>
> The output should look like: Dernier changement 1er septembre 2016

Not tested, but it should be something like this:

lib.navigation.footer {
   10 = TEXT
   10 {
     data = page:lastUpdated
     strftime = %e %B %Y
     strftime.override = %eer %B %Y
     strftime.override.if {
       value.data = page:lastUpdated
       value.strftime = %e
       equals = 1
     }
     wrap = <p>Dernier changement�:�|</p>
   }
}


-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list