This tutorial will show you how can you calculate either future date from a particular date to “plus a number of given days” or past date from a particular date to “minus a number of given days”.
Future or past date calculation may be required for various purposes such as to calculate the age of a person on future date or on past date.
I will show you this calculation in PHP language. If you need to calculate in Java please read here https://www.jeejava.com/future-or-past-date-in-java/
We first need to setup an appropriate timezone otherwise php sometimes give warnings. I have set “Asia/Kolkata”, you can set according to your timezone.