function obtenerFecha($fecha){ $row = split("/",$fecha); switch($row[1]){ case "1": $mes = "ENERO"; break; case "01": $mes = "ENERO"; break; case "2": $mes = "FEBRERO"; break; case "02": $mes = "FEBRERO"; break; case "3": $mes = "MARZO"; break; case "03": $mes = "MARZO"; break; case "4" : $mes = "ABRIL"; break; case "04": $mes = "ABRIL"; break; case "5" : $mes = "MAYO"; break; case "05": $mes = "MAYO"; break; case "6": $mes = "JUNIO"; break; case "06": $mes = "JUNIO"; break; case "7": $mes = "JULIO"; break; case "07": $mes = "JULIO"; break; case "8": $mes = "AGOSTO"; break; case "08": $mes = "AGOSTO"; break; case "9": $mes = "SEPTIEMBRE"; break; case "09": $mes = "SEPTIEMBRE"; break; case "10": $mes = "OCTUBRE"; break; case "11": $mes = "NOVIEMBRE"; break; case "12": $mes = "DICIEMBRE"; break; } $day = weekday($fecha); switch($day){ case "0": $dia = "LUNES "; break; case "1": $dia = "MARTES "; break; case "2": $dia = "MIERCOLES "; break; case "3": $dia = "JUEVES "; break; case "4": $dia = "VIERNES "; break; case "5": $dia = "SABADO "; break; case "6": $dia = "DOMINGO "; break; } return "DEL DIA ".$dia.$row[0]." DE ".$mes." DEL ".$row[2]; }
function prior_monday($fyear, $fmonth, $fday) { return date("Y-m-d", mktime(0, 0, 0, $fmonth, $fday - weekday($fyear, $fmonth, $fday), $fyear)); }