Bonjours à tous j'utilise un script pour déterminer la saison en js j'avais trouver un plutôt bien mais qui s' arrêtais au mois. j'ai donc fais une modif pour que changement se fasse après le 21 c'est une moyenne . mais vu mon niveau je voudrais savoir si selon vous ça vas marcher.
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var total = month;
var day = currentTime.getDate()
var doc
doc=document.location.href.split("?")
// Summer
if ( day >=21 & total >=6 && total <= 8)
{
document.write("<img src='monsite/saison/ete/ete_" + parseInt(Math.random()*4) + ".png' />");
}
// Autumn
else if ( day >=21 & total >=9 && total <= 11)
{
document.write("<img src='monsite/saison/automne/aut_" + parseInt(Math.random()*4) + ".png' />");
}
// Winter
else if ( day >=21 & total ==12 || total == 1 || total == 2)
{
document.write("<img src='monsite/saison/hivers/hiv_" + parseInt(Math.random()*4) + ".png' />");
}
// Spring
else if ( day >=21 & total >=3 && total <= 6)
{
document.write("<img src='monsite/saison/printemps/pri_" + parseInt(Math.random()*4) + ".png' />");
}
else
{
document.write("<b><br>Error!</b>");
}