Opposite of subtracting weeks from a java date, this example will show how to add weeks to a date using Calendar.add, java 8 date time api, joda DateTime.plusWeeks and apache common DateUtils.addWeeks. In the examples below, we will set a date that represents christmas, December 25th, then add a week to return a date representing new years day or January 1st.
Straight up Java
Output
Java 8 Date and Time API
Java 8 LocalDateTime.plusWeeks will return a copy of the LocalDateTime with the specified number of weeks added.
Output
Joda Time
Joda DateTime.plusWeeks will return a copy the DateTime plus the specified number of weeks.
Output
Apache Commons
Apache commons DateUtils.addWeeks will adds a number of weeks to the date returning a new object.