[TYPO3-english] [TYPO3-engl

bernd wilke t3ng at bernd-wilke.net
Wed Nov 20 16:33:18 CET 2013


Am 20.11.13 16:05, schrieb Miguel:
> And how can i access the current time ?
> Should i use this code right here:
>
> temp.current_date = TEXT
> temp.current_date {
>   data = date : U
>   strftime = %A, %e. %B %Y
> }

don't use human readable format. timestamp is very good to compare two 
time values. otherwise you have to split the date and build up a logik 
for the correct priority. PITA.

so it could be
20.stdWrap.if.isGreaterThan.cObject = TEXT
20.stdWrap.if.isGreaterThan.cObject.data = date:U
20.stdWrap.if.data = register:usergroup_endtime

> and then compare it like this:
>
> 20.stdWrap.if.isGreaterThan.date = temp.current_date

as this would use the string 'temp.current.date' as formatstring for the 
php-function date it would result in something like:
t e   m p.c                        u     rre  n t _d a t e
301MEZ11p.2013-20-12T16:25:02+00:00123456rrMEZ1130_20pm30MEZ

also wrong would be
20.stdWrap.if.isGreaterThan.date < temp.current_date

which would result in
20.stdWrap.if.isGreaterThan.date = TEXT
20.stdWrap.if.isGreaterThan.date
    data = date : U
    strftime = %A, %e. %B %Y
  }

giving:

T  EXT
MSZEXMSZ

or more scrambled as this would be stdWraped with strftime

;-)


bernd
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-english mailing list