This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calcuate days in a calender.era or between two days

 
aminur rashid
Ranch Hand
Posts: 79
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have two Date Instance
Date startDate and Date endDate.
Now user will be specifying some step size to go from startDate to endDate in a JSpinner.
Now i have to validate that the step size should be less than the number of days between startDate and endDate.
e.g
startDate is 05/01/2000 // in dd//MM/yyyy format
and endDate is 05/02/2000 //in same format
Now i should stop user from selecting step size as Calendar.Era,Calendar.Year but should allow him to select lower values.
Any idea how to proceed??
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a topic that discusses how to find the difference in two dates:
http://www.coderanch.com/t/282529/JSP/java/Subtracting-Time-Date-JSP
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic