
{filelink=5563}
import java.util.Calendar;
public class SoustraireMois
{
public static void main(String[] args) {
Calendar maintenant = Calendar.getInstance();
System.out.println("Date Actuelle: " + maintenant.get(Calendar.DATE) + "-"
+(maintenant.get(Calendar.MONTH) + 1) + "-" + maintenant.get(Calendar.YEAR));
maintenant.add(Calendar.MONTH, -5);
System.out.println("Date avant 5 mois : " + maintenant.get(Calendar.DATE) + "-"
+(maintenant.get(Calendar.MONTH) + 1) + "-" + maintenant.get(Calendar.YEAR));
}
}