import java.util.Calendar; import java.util.Date; public class main { public static void main(String[] args) { Date today = getXdaysLater(0); Date oneMonLater = getXdaysLater(30); Date twoMonLater = getXdaysLater(60); Date halfYearLater = getXdaysLat…