CodeKicks.com
Focus on Microsoft Technologies - Tutorials, Articles, Code Samples.

Wednesday, October 11, 2006

Date Range Checking in .NET

public static bool DateRangesIntersect(
DateTime start1,
DateTime end1,
DateTime start2,
DateTime end2){ return !(end2 < start1 || start2 > end1);}

Post a Comment