aspose file tools
The moose likes Java in General and the fly likes Adding three weeks to a date Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Adding three weeks to a date" Watch "Adding three weeks to a date" New topic
Author

Adding three weeks to a date

Lisa Modglin
Ranch Hand

Joined: Oct 28, 2003
Posts: 46
I need to compute several dates based on another date. I understand how to use the GregorianCalendar to add weeks to another GregorianCalendar object, but I have a date. Is it really necessary to get each portion of my date in order to instantiate the GregorianCalendar object? I don't see where the constructor takes a date. Any suggestions?
Horatio Westock
Ranch Hand

Joined: Feb 23, 2005
Posts: 221


Lisa Modglin
Ranch Hand

Joined: Oct 28, 2003
Posts: 46
Thank you so much! I'm still fairly new and I overlook things. So, you intantiate the object to today's date, then set the time to your date object. Works for me!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Adding three weeks to a date
 
Similar Threads
testing my java DAO insert method using GregorianCalendar instead of java.sql.Date?
Question about GregorianCalendar class
Format Date using Calendar
Comparing dates...
Add 1 day to a date?