File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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
 
 
subject: Help with next day and previous day