// scripts écrits par reant.net

function writeRecentFile(year, month) {
	var updatedDate = new Date();
	if (updatedDate.getFullYear() == year && updatedDate.getMonth() - month <= 1) {
		var date = monthIdToFrenchString(month) + " " + year;
		document.write("dernière mise à jour : " + date);
		document.write("<br />");
	}
}

function monthIdToFrenchString(id) {
	switch (id) {
		case 0: return "janvier";
		case 1: return "février";
		case 2: return "mars";
		case 3: return "avril";
		case 4: return "mai";
		case 5: return "juin";
		case 6: return "juillet";
		case 7: return "août";
		case 8: return "septembre";
		case 9: return "octobre";
		case 10: return "novembre";
		case 11: return "décembre";
	}
}

function writeAge() {
	var year = 1983;
	var month = 6; // juillet
	var date = new Date();
	var age = date.getFullYear() - year;
	if (date.getMonth() < month) {
		age--;
	}
	document.write("<br />");
	document.write(age + ' ans');
}
