File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Check Date span Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Check Date span" Watch "Check Date span" New topic
Author

Check Date span

Farooq Ali
Ranch Hand

Joined: Sep 30, 2000
Posts: 43
Hi guys I need some help tackling a problem.
I am trying to compare different date spans and then try to coalesce them (merge them)
this is the contructor of the DateSpan class I was provided with
public DateSpan(Date start, Date end)
throws IllegalArgumentException
{
if (end.before(start)) {
throw new IllegalArgumentException("End date " + end + " is before start date "
+ start);
}
setStart(start);
setEnd(end);
}
these datespan object are then wrapped with another object and then put in a List.

Now for a certain object we can have different datspans.
If these date spans intersect or over lap I have to merge them all together and show just one DateSpan starting from earliest to the latest Date.
I would appreciate some input this
Thanks
Farooq
sfa77@yahoo.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Check Date span
 
Similar Threads
Java calender get weeks in month, start date and enddate
a modelling problem
Merge 2 databases in MySQL
Dynamically changing class Attribute
how to access MSAccess and Oracle in one query