get week day

php Add comments
<?
$date=date("Y-m-d");

function getweekday($date){
  $pieces = explode("-", $date);
  $tstamp=mktime(0,0,0,$pieces[1],$pieces[2],$pieces[0]);
  $Tdate = getdate($tstamp);
  $wday=$Tdate["wday"];
  return $wday;
}
?>

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in