Hola
tengo que mostrar una imagen según la estación del año.
El caso es que no se como compar las fechas.
Tengo lo siguiente, pero no va de ninguna forma:
define("OTONO","23-09");
define("INVIERNO","21-12");
define("PRIMAVERA","21-03");
define("VERANO","21-06");
$fecha_hoy = date(d)."-".date(m);
switch($fecha_hoy)
{
case strtotime ($fecha_hoy)>strtotime (INVIERNO) AND strtotime ($fecha_hoy)<strtotime (VERANO):
$icono = $icono_estacion["primavera"];
break;
case strtotime ($fecha_hoy)>strtotime (PRIMAVERA) AND strtotime ($fecha_hoy)<strtotime (OTONO):
$icono = $icono_estacion["verano"];
break;
case strtotime ($fecha_hoy)>strtotime (VERANO) AND strtotime ($fecha_hoy)<strtotime (INVIERNO):
$icono = $icono_estacion["otono"];
break;
case strtotime ($fecha_hoy)>strtotime (OTONO) AND strtotime ($fecha_hoy)<strtotime (PRINAVERA):
$icono = $icono_estacion["invierno"];
break;
default: $icono = "ico_vacio.gif";
}
LLevo 3 horas dándole vueltas a esta chorrada y no encuentro la fórmula.
Saludos