How do I add n days to a date in Java Creating my own java class?
For example, my date is (dd/mm/yyyy) = 26/02/2014
Adding 3 days, the output should be 01/03/2014
.
Without importing Calendar or Date from JAVA API
Thank you in Advance. Any Sample code or Pseudo Code or idea will be highly apprecited
Question: increase or update given date by certain days, without using calendar or date class?
Answer: I verified first ex and that seems like good a reference for storing values in maps (as days for months are fixed).
My solution is below and it is working correctly, when I tested.
Solution code:
Points to remember: