Find out the future date with Python

This tutorial will focus on how to add days to date in Python or you can say how to find a future date in Python.

Hey Pythoneers,

Do you sometimes get lost and wonder finding out the dates? Do you ever rush to the calendar for it?

What will be the date after 75 days from today?  To find out you have two options:

  • Either open your calendar and count 75 days (too much time taking process) OR
  • Follow this simple program to find out the date in seconds.

In this tutorial we’ll learn how to calculate the future date with some inputs. You have to enter the start date (day,month and the year) and the no. of incremental days.

Find out a future date in Python

import array
d=int(input("Enter a day:"))
months=int(input("Enter a month:"))
year=int(input("Enter a year:"))
days=int(input("Enter number of days:"))
if year%4==0:
while count<days:
    if d>month[months]:
    if months>12:
        if year%4==0:

print("Future date= ", end='')

Supposedly, you enter 25-5-2019 as the start date and you want the future date after 75 days then the code will produce the following output:

Enter a day:25
Enter a month:5
Enter a year:2019
Enter the number of days to find out the future date:75
Future date= 8-8-2019

Therefore, the future date of 25-5-2019 after 75 days is  8-8-2019.

Note: This code works with any date but the inputs should be taken in integer values only.

So, here it is. This Python program saves your time and the irritation of repeatedly opening the calendar and counting the days. Remember that array should be used to store the number of days each month contains.

You may also read,

Leave a Reply

Your email address will not be published. Required fields are marked *