• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with next day and previous day

 
Anthony Vit
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

HTH

Stefan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic