public static function parseDateRange($dateString)
    {
        $matched = preg_match('/^([0-9]{4}-[0-9]{1,2}-[0-9]{1,2}),(([0-9]{4}-[0-9]{1,2}-[0-9]{1,2})|today|now|yesterday)$/D', trim($dateString), $regs);

        if (empty($matched)) {
            return false;
        }

        return $regs;
    }
public static function parseDateRange($dateString)
    {
        $matched = preg_match('/^([0-9]{4}-[0-9]{1,2}-[0-9]{1,2}),(([0-9]{4}-[0-9]{1,2}-[0-9]{1,2})|today|now|yesterday)$/D', trim($dateString), $regs);

        if (empty($matched)) {
            return false;
        }

        return $regs;
    }
public static function parseDateRange ( $ dateString ) { $ matched = preg_match ( '/^([0-9]{4}-[0-9]{1,2}-[0-9]{1,2}),(([0-9]{4}-[0-9]{1,2}-[0-9]{1,2})|today|now|yesterday)$/D' , trim ( $ dateString ) , $ regs ) ; if ( empty ( $ matched ) ) { return false ; } return $ regs ; }
Given a date string, returns `false` if not a date range,
or returns the array containing start and end dates.

@param string $dateString
@return mixed  array(1 => dateStartString, 2 => dateEndString) or `false` if the input was not a date range.
Given a date string returns false if not a date range or returns the array containing start and end dates .