S
Souris
I have application needs to validate 2 time range.
when user enter an event start date and end date which must not exists in
old event overlap.
For example, user enters a new event start on Mar/14 and End Mar/17.
The validation must check there is no event happens between Mar/14 and Mar/17.
If I check the New Start before old start date and after old end date and
New end date before old start date and after old end, but it fails when old
even between Mar/15 and Mar/16. The validation passes even 2 events have
overlap time frame. Vise versa.
I am looking for a mechanizm to compare 2 time ranges.
Your help is great appreciated,
when user enter an event start date and end date which must not exists in
old event overlap.
For example, user enters a new event start on Mar/14 and End Mar/17.
The validation must check there is no event happens between Mar/14 and Mar/17.
If I check the New Start before old start date and after old end date and
New end date before old start date and after old end, but it fails when old
even between Mar/15 and Mar/16. The validation passes even 2 events have
overlap time frame. Vise versa.
I am looking for a mechanizm to compare 2 time ranges.
Your help is great appreciated,