[TYPO3] TS and date

Martin S martin at hauntedhousecom.net
Tue Jul 18 08:50:15 CEST 2006


Martin S wrote:

> Andrea Giorgini wrote:
> 
>> Hi list,
>> 
>> I've a date through TS this way:
>> 
>> dataWrap={date: d}<sup>th</sup> of {date: F} {date: Y}
>> 
>> I would like to implement a condition to replace th with st in case is
>> the first day of the month, and I tried:
>> 
>> [{date: d}=01]
>> dataWrap={date: d}<sup>st</sup> of {date: F} {date: Y}
>> [ELSE]
>> dataWrap={date: d}<sup>th</sup> of {date: F} {date: Y}
>> [END]
>> 
>> but didn't work... any suggestion?
> 
> no, but you also need to consider the 2nd in the month.
> As well as 21st, 22nd and the 31st (but not the 32nd :-p)

Oh and the 3rd, 23rd.
(How did I miss that?)

Martin S




More information about the TYPO3-english mailing list