How to get the date after 365 days?

83 views Asked by At

What I am looking for:

If current date is 1st january 2020, then i want 31st dec, 2020.

If its 1st feb 2020 then i want 31st jan, 2021.

Is there any way to get the above result without third party library?

What I tried was to add 365 days but as we know the days are not 365 always so it did not work.

Looking for solution

0

There are 0 answers