1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
function ecart_mois(date_max, date_min)
{
var explode_date_min;
var explode_date_max;
var mois_min;
var annee_min;
var mois_max;
var annee_max;
var ecart;
explode_date_min = date_min.split('/');
explode_date_max = date_max.split('/');
mois_min = parseInt(explode_date_min[0]);
annee_min = parseInt(explode_date_min[1]);
mois_max = parseInt(explode_date_max[0]);
annee_max = parseInt(explode_date_max[1]);
ecart = ((annee_max - annee_min)*12) - (mois_min) + (mois_max);
return ecart;
} |