Para la estación prueba esto:
Código PHP:
<html>
<head>
<script language="JavaScript">
function enRango(dHoy, mHoy, dIni, mIni, dFin, mFin){
bRes = true;
bRes = bRes && ((mHoy > mIni) || ((mHoy == mIni) && (dHoy >= dIni)));
bRes = bRes && ((mHoy < mFin) || ((mHoy == mFin) && (dHoy <= dFin)));
return bRes;
}
function estacion(dia, mes){
if (enRango(dia, mes, 21, 3, 20, 6)) sRes = "Primavera"; else
if (enRango(dia, mes, 21, 6, 20, 9)) sRes = "Verano"; else
if (enRango(dia, mes, 21, 9, 20, 12)) sRes = "Otoño"; else
sRes = "Invierno";
return sRes;
}
function calcula(){
var dia = parseInt(document.frm.Dia.value);
var mes = parseInt(document.frm.Mes.value);
return estacion(dia, mes);
}
</script>
</head>
<body>
<form name="frm">
Dia:
<input type="text" name="Dia"><br>
Mes:
<input type="text" name="Mes"><br>
Estación:
<input type="text" name="Res" readonly><br>
<input type="button" value="Calcular" onclick="javascript:document.frm.Res.value=calcula()">
</form>
</body>
</html>
Saludos.