import java.text.DateFormat; import java.util.Calendar; public class CalendarManipulation { public static void main(String s[]) { Calendar cal = Calendar.getInstance(); DateFormat df = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.MEDIUM); System.out.println(df.format(cal.getTime())); cal.add(Calendar.HOUR, -4); System.out.println(df.format(cal.getTime())); } }