Possible Duplicate:
How check intersection of DateTime periods
Hello guys I have two datetime ranges old Check in, Check Out and New Check in, Check Out how i can compare this two date time ranges each other if Old Range contains or equals new Range?
Not exactly sure what you’re trying to accomplish.
Simply put, you have 4 cases:
If you want to test all of these, you need to if, else if them all. But if you only care about case 1, you can test that by doing this sort of thing: