[TYPO3] Conditions...

Olivier Dobberkau olivier.dobberkau at dkd.de
Thu Feb 1 23:50:35 CET 2007


in Beitrag 
mailman.118017.1170369125.21325.typo3-english at lists.netfielders.de schrieb
Benjamin Mack unter mack at xnos.org am 01.02.2007 23:32 Uhr:

> Hey Oliver,
> 
> this is quite funny, I don't find it in tsref either. Looks like it
> doesn't exist, but I'm sure there is an extension out there that does this.
> Maybe we should report a bug, since this is really a missing core feature?


Hi,

I have checked in the code.

It does not exist. I will try to add it with a patch.

// hour, minute, dayofweek, dayofmonth, month
        case 'hour':
        case 'minute':
        case 'dayofweek':
        case 'dayofmonth':
        case 'month':
            $theEvalTime = $GLOBALS['SIM_EXEC_TIME'];    // In order to
simulate time properly in templates.
            switch($key) {
                case 'hour':        $theTestValue = date('H',$theEvalTime);
break;
                case 'minute':        $theTestValue =
date('i',$theEvalTime);    break;
                case 'dayofweek':    $theTestValue = date('w',$theEvalTime);
break;
                case 'dayofmonth':    $theTestValue =
date('d',$theEvalTime);    break;
                case 'month':        $theTestValue = date('m',$theEvalTime);
break;
            }
            $theTestValue = intval($theTestValue);
                // comp
            $values = explode(',',$value);
            reset($values);
            while(list(,$test)=each($values))    {
                $test = trim($test);
                if (t3lib_div::testInt($test))    {$test='='.$test;}
                if (strlen($test)) {
                    if ($this->testNumber($test,$theTestValue)) {return
true;}
                }
            }
        break;

Maybe we need also a julian date condition. Or day or year.

Olivier 



More information about the TYPO3-english mailing list