我们可以strtotime()使用变量只包含月份和一年中的某一天,并从中得到一周中某一天的文字表示吗?

时间:2016-08-25 14:58:03

标签: php

我们可以strtotime()使用变量只包含月份和一年中的某一天,并从中得到一周中某一天的文字表示吗? ? 这是我的尝试:

function something
{
    $sale_date=date('md');
    if($this->isSat($sale_date))
    {
        ------;
    }
}


function isSat($sale_date)
{
    $sale_date_time=strtotime($sale_date);
    $day=date('l',$sale_date_time);
    if($day=='Saturday')
    {return true;}
}

0 个答案:

没有答案