• Post Reply Bookmark Topic Watch Topic
  • New Topic

Date Question  RSS feed

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a date question. Which is better Date or Calendar for the following application.

I want to get today's date. I then want to add an amount of days to that date for a projection. For example, let's say today is April 15 and I want to do a projection that is from today's date to say, 25 days from now.

Would I use Date or Calender?
 
drifter
Ranch Hand
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the Java Documentation.

If you skim the overall class description and check for promising methods you may find what you need in one of the classes you mentioned: java.util.Calendar
java.util.Date
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!