Given a Date dt you have several possibilities:

Solution 1: You can use the Calendar class for that:

Date dt = new Date();
Calendar c = Calendar.getInstance(); 
c.setTime(dt); 
c.add(Calendar.DATE, 1);
dt = c.getTime();

Solution 2: You should seriously consider using the Joda-Time library, because of the various shortcomings of the Date class. With Joda-Time you can do the following:

Date dt = new Date();
DateTime dtOrg = new DateTime(dt);
DateTime dtPlusOne = dtOrg.plusDays(1);

Solution 3: With Java 8 you can also use the new JSR 310 API (which is inspired by Joda-Time):

Date dt = new Date();
LocalDateTime.from(dt.toInstant()).plusDays(1);

Solution 4: With org.apache.commons.lang3.time.DateUtils you can do:

Date dt = new Date();
dt = DateUtils.addDays(dt, 1)
Answer from Daniel Rikowski on Stack Overflow
🌐
BeginnersBook
beginnersbook.com › 2017 › 10 › java-add-days-to-date
Java – Add days to Date
Adding one day to current date: 2017-10-19 Adding days to the current date: 2017-10-25 Adding one day to the given date: 2016-10-15 Adding days to the given date: 2016-10-23 · 1. Java – How to get current Date and Time 2. Getting current date and time in Java 8 3.
Discussions

Looking for help on Java Script that adds 50 days to current date
let currentDate = new Date(); currentDate.setDate(currentDate.getDate() + 50); More on reddit.com
🌐 r/learnjavascript
18
1
October 16, 2024
Creating a while loop calendar.
I'd start with making an enum beginning with Sunday (1) ending with Saturday (7). Given a start day (E.g Wednesday = 4) iterate the rest of the week (5, 6, 7), for (int i=0; i< (7 - 4) { WEEKS.valueOf(i); } That gives us 3 days on our calender, and leaving us to start on Sunday. If the user entered 30 total days, we have 27 days left beginning on Sunday. You should iterate 27 times, starting from 1-7 until the number is no longer divisble by 7, leaving the ending week. More on reddit.com
🌐 r/javahelp
7
1
January 10, 2018
🌐
How to do in Java
howtodoinjava.com › home › java date time › add or subtract days, months & years to date in java
Add or Subtract Days, Months & Years to Date in Java
February 23, 2022 - The calendar.add(int field, int amount) method takes two arguments, i.e., field type and the field value. We can use this method to add days, months or any time unit in the underlying Date class.
🌐
GeeksforGeeks
geeksforgeeks.org › java › calendar-add-method-in-java-with-examples
Calendar add() Method in Java with Examples - GeeksforGeeks
July 11, 2025 - // Java Program to Illustrate add() Method // of Calendar class // Importing required classes import java.util.Calendar; // Main class public class GFG { // Main driver method public static void main(String args[]) { // Creating a calendar object ...
🌐
Coderanch
coderanch.com › t › 428375 › java › add-days-currentDate-java-util
add 10 days to currentDate in java.util.Date or cast to Calendar? (Beginning Java forum at Coderanch)
January 28, 2009 - I know, I can add or substract days, years,.. from an actual Calenar-Instance. But how can I do it with the java.util.Date? For example Date myDate = new Date(); myDate.setMonth(a.getMonth()+1); But setMonth is depraceted, so I should use Calendar. But how can I convert /cast a Calendar-Instance to a Date-Instance, when I need the Date?
🌐
Mkyong
mkyong.com › home › java › java – how to add days to current date
Java - How to add days to current date - Mkyong.com
November 15, 2016 - Example to add 1 year, 1 month, 1 day, 1 hour, 1 minute and 1 second to the current date. ... package com.mkyong.time; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class DateExample { private static final DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); public static void main(String[] args) { Date currentDate = new Date(); System.out.println(dateFormat.format(currentDate)); // convert date to calendar Calendar c = Calendar.getInstance(); c.setTime(currentDate); // manipulate date c.add(Calendar.YEA
Find elsewhere
🌐
Blogger
javarevisited.blogspot.com › 2012 › 12 › how-to-add-subtract-days-months-years-to-date-time-java.html
How to add, subtract days, months, years, hours from Date and Time in Java - Example
August 23, 2021 - Positive value passed into add() method will add days into date while negative values will subtract days from date in Java. Similarly Calendar.MONTH can be used to add and subtract months from date in Java.
🌐
Blogger
javarevisited.blogspot.com › 2013 › 04 › ow-to-increment-decrement-date-by-days-java.html
How to add and substract days in current date in Java? Example Tutorial
July 28, 2021 - Java Tutorial to add days into current date in Java. Code example to increment, decrement, add, subtract days into date using Java programming API.
🌐
BeginnersBook
beginnersbook.com › 2017 › 11 › java-8-adding-days-to-the-localdate
Java 8 – Adding Days to the LocalDate
September 11, 2022 - We are using now() method of LocalDate class to get the current date and then using the plusDays() method to add the specified number of days to the LocalDate. import java.time.LocalDate; public class Example { public static void main(String[] args) { //current date LocalDate today = ...
🌐
Attacomsian
attacomsian.com › blog › java-add-days-to-date
How to add days to a date in Java
October 14, 2022 - A quick tutorial to learn how to add days to a date using Java 8 new date and time API as well as the legacy Date and Calendar API.
🌐
date-fns
date-fns.org
date-fns - modern JavaScript date utility library
date-fns provides the most comprehensive yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js.
🌐
Falkhausen
falkhausen.de › docs › Java-7 › java.util › Calendar › m28.html
Untitled
Adds or subtracts the specified amount of time to the given calendar field, based on the calendar's rules. For example, to subtract 5 days from the current time of the calendar, you can achieve it by calling:
🌐
Baeldung
baeldung.com › home › java › java dates › increment date in java
Increment Date in Java | Baeldung
January 8, 2024 - The java.time.LocalDate class is an immutable date-time representation, often viewed as year-month-day. LocalDate has many methods for date manipulation, let’s see how we can use it to accomplish the same task: public static String addOneDay(String date) { return LocalDate .parse(date) .plusDays(1) .toString(); }
🌐
Vultr Docs
docs.vultr.com › java › examples › add-two-dates
Java Program to Add Two Dates | Vultr Docs
November 25, 2024 - Create an instance of java.util.Date to represent the starting date. Utilize java.util.Calendar to add a specified number of days to the date.
🌐
JanBask Training
janbasktraining.com › community › java › how-to-add-days-to-date
How to add days to Date? | JanBask Training Community
September 21, 2025 - Avoid manual calculation: Adding days manually is error-prone because of leap years, varying month lengths, and time zones. Negative days: You can subtract days by passing negative values (e.g., -7 for a week earlier). Real-world uses: Generating due dates, scheduling tasks, setting reminders, or calculating expiry dates.
🌐
Tutorjoes
tutorjoes.in › Java_example_programs › add_days_to_the_current_date_in_java
Write a Java Program to Add days to the current date
3, which adds 3 days to the current date and time. Finally, the program prints out the resulting date and time using the ... Date object representing the current date and time. import java.util.*; public class Add_Days { public static void main(String[] args) { Calendar cal = Calendar.getI...
🌐
Medium
medium.com › @AlexanderObregon › javas-localdate-plusdays-method-explained-6c06a2bc2f8d
Java’s LocalDate.plusDays() Method Explained | Medium
December 14, 2024 - Let’s take a deeper look at how it functions and the various ways it can be applied. The plusDays() method accepts a single argument, which is the number of days to be added to the date.
🌐
Apache Commons
commons.apache.org › proper › commons-lang › javadocs › api-release › org › apache › commons › lang3 › time › DateUtils.html
DateUtils (Apache Commons Lang 3.11 API)
For instance, passing Thursday, ... day. This method provides an iterator that returns Calendar objects. The days are progressed using Calendar.add(int, int)....
🌐
Reddit
reddit.com › r/learnjavascript › looking for help on java script that adds 50 days to current date
r/learnjavascript on Reddit: Looking for help on Java Script that adds 50 days to current date
October 16, 2024 -

Hello All,

I was tasked at work to develop a dynamic stamp to use on our Kofax Power PDF documents. So i made the stamp form and now I am to the point where i need some help. Part of the STAMP needs to display the date that is 50 calendar days from the current date. I can get to where the current date is displayed.

event.value = (new Date()).toString();

AFDate_FormatEx("mmm/dd/yyyy");

This is the code as it appears in my JavaScript editor, within Power PDF. That code displays:

Oct/16/2024

What I need it to display is the date that is 50 days in the future. Ive tried using ChatGPT and it spits out the code but it doesn't work when I paste it. What am I missing? Any help would be appreciated.

Thanks!