This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Help with next day and previous day Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help with next day and previous day" Watch "Help with next day and previous day" New topic
Author

Help with next day and previous day

Anthony Vit
Greenhorn

Joined: Nov 27, 2004
Posts: 7
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.

:
Stefan Krompass
Ranch Hand

Joined: Apr 29, 2004
Posts: 75
Hi,

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

HTH

Stefan
 
Don't get me started about those stupid light bulbs.
 
subject: Help with next day and previous day
 
Similar Threads
help me in time comparison
how to change the date format
Date formatting
Time conversion question
Alternative to deprecated Date.toGMTString()