Opposite of subtracting days from date in java, this example demonstrates how to add days to a date using java Calendar.add, java 8 date time api, joda DateTime.plusDays and apache commons DateUtils.addDays. Since the Green Bay Packers won super bowl XLV against the Pittsburgh Steelers on February 6, 2011 we will add one day simulating the celebration date.
Straight up Java
Output
Java 8 Date and Time API
Java 8 LocalDateTime.plusDays will return a copy of the LocalDateTime with the specified number of days added.
Output
Joda Time
Joda DateTime.plusDays will return a copy the DateTime plus the specified number of days.
Output
Apache Commons
Apache commons DateUtils.addDays will adds a number of days to the date returning a new object.