Overlapping dates

OffersStart DateEnd Date

Offer101/04/200730/04/2007

Offer214/02/200728/02/2007

Offer301/02/200713/02/2007

Offer417/03/200730/03/2007

Valid: Offer5 01/03/200716/03/2007

Not Valid: Offer6 20/03/200728/03/2007

Limitation: No dates overlapping between any offers.

[308 byte] By [Manju2007a] at [2007-11-27 5:03:54]
# 1
Well that seems a fine set of requirements to me.
cotton.ma at 2007-7-12 10:22:06 > top of Java-index,Java Essentials,Java Programming...
# 2

The problem is here i have both start date and end date for each offer, and have to check with other offers start date and end date for overlapping.

Offers Start Date End Date

Offer1 01/04/2007 30/04/2007

Offer2 14/02/2007 28/02/2007

Offer3 01/02/2007 13/02/2007

Offer4 17/03/2007 30/03/2007

In the above query Offer 5 is valid bcos there is no overlapping with any other offers.

But offer 6 is not valid bcos the dates overlap with offer 4 dates.

Valid: Offer5 01/03/2007 16/03/2007

Not Valid: Offer6 20/03/2007 28/03/2007

Manju2007a at 2007-7-12 10:22:06 > top of Java-index,Java Essentials,Java Programming...
# 3

> The problem is here i have both start date and end

> date for each offer, and have to check with other

> offers start date and end date for overlapping.

>

> Offers Start Date End Date

> Offer1 01/04/2007 30/04/2007

> Offer2 14/02/2007 28/02/2007

> Offer3 01/02/2007 13/02/2007

> Offer4 17/03/2007 30/03/2007

>

> In the above query Offer 5 is valid bcos there is no

> overlapping with any other offers.

> But offer 6 is not valid bcos the dates overlap with

> offer 4 dates.

>

> Valid: Offer5 01/03/2007 16/03/2007

> Not Valid: Offer6 20/03/2007 28/03/2007

Yes I see that. Well the requirements for your code seem quite clear then.

cotton.ma at 2007-7-12 10:22:06 > top of Java-index,Java Essentials,Java Programming...