1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
<SCRIPT language = "JavaScript" >
function renouvellement(finCotisation){
var separator = "/";
var StartDate = finCotisation;
array_finCotisation= StartDate.split(separator);
secondes_debut = (new Date(array_finCotisation[2],array_finCotisation[1],array_finCotisation[0])).getTime()+ 86400000 ;
debut_date = new Date(secondes_debut);
New_Jour=debut_date.getDate();
New_mois=debut_date.getMonth();
if (New_mois==0){
New_mois="12";
}
New_An=debut_date.getFullYear();
debut_date=New_Jour+separator+New_mois+separator+New_An;
date_debut=prompt("date de début de cotisation est :",""+debut_date+"");
if (!date_debut){
return false;
}
date_duree=prompt("durée de la cotisation(en mois) :","12");
array = date_debut.split(separator);
secondes = (new Date(array[2],array[1],array[0])).getTime()+ date_duree*2628000000;
nouvelle_date = new Date(secondes);
New_Jour=nouvelle_date.getDate();
New_mois=nouvelle_date.getMonth();
if (New_mois==0){
New_mois="12";
}
New_An=nouvelle_date.getFullYear();
Xday=New_Jour+separator+New_mois+separator+New_An;
date_fin=prompt("date de fin de cotisation est :",Xday);
if (confirm('envoi')){
return true;
}else{
return false;
}
}
</SCRIPT> |
Partager