Forums Register Login

Help with next day and previous day

+Pie Number of slices to send: Send
Hello. I am writting a program that outputs the current time and day. I also have to output next day and previous day. Ex:

Today is Sunday
Yesterday was Saturday
Tomorrow is Monday

I have the today is, but I can't figure out how to do the yesterday and tomorrow. Any help would be appreciated.
Here is what I have so far. I put ***** where I need the help. Thanks to everyone in advance.

:
+Pie Number of slices to send: Send
Hi,

look at the Calendar-class. Method add might be what you look for...

HTH

Stefan
Look! I laid an egg! Why does it smell like that? Tiny ad, does this smell weird to you?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 942 times.
Similar Threads
Date formatting
how to change the date format
Alternative to deprecated Date.toGMTString()
help me in time comparison
Time conversion question
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 01:17:15.