Return to Snippet

Revision: 44505
at April 12, 2011 23:41 by dsoms


Updated Code
// Date format (yyyy/mm/dd)

function getWeekDay($date)
{
    $date = str_replace("/","-", $date);
    list($year, $month, $day) = explode("-", $date);
    $week_day = date("w", mktime(0, 0, 0, $month, $day, $year));
    return $week_day;
}

Revision: 44504
at April 12, 2011 23:41 by dsoms


Updated Code
// Date format (yyyy/mm/dd)

function getWeekDay($date)
{
    $date = str_replace("/","-", $date);
    list($day, $month, $year) = explode("-", $date);
    $week_day = date("w", mktime(0, 0, 0, $month, $day, $year));
    return $week_day;
}

Revision: 44503
at April 12, 2011 23:40 by dsoms


Updated Code
// Date format (yyyy/mm/dd)

function getWeekDay($date)
{
    $date = str_replace("/","-",$date);
    list($day, $month, $year) = explode("-", $date);
    $week_day = date("w", mktime(0, 0, 0, $month, $day, $year));
    return $week_day;
}

Revision: 44502
at April 12, 2011 23:40 by dsoms


Initial Code
// Date format (yyyy/mm/dd)

function getWeekDay($date)
{
    $date = str_replace("/","-",$date);
    list($day, $month, $year) = explode("-", $date);
    $num_day = date("w", mktime(0, 0, 0, $month, $day, $year));
    return $num_day;
}

Initial URL

                                

Initial Description

                                

Initial Title
Get day of week

Initial Tags
php, date

Initial Language
PHP