Two Laptop Bag*
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
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()