Skip to content

Instantly share code, notes, and snippets.

@jittuu
Created June 26, 2011 06:36
Show Gist options
  • Select an option

  • Save jittuu/1047322 to your computer and use it in GitHub Desktop.

Select an option

Save jittuu/1047322 to your computer and use it in GitHub Desktop.
public static class DateTimeExtensions
{
public static bool IsAfter(this DateTime current, DateTime value)
{
return current > value;
}
public static bool IsBefore(this DateTime current, DateTime value)
{
return current < value;
}
public static bool IsAfterDate(this DateTime current, DateTime value)
{
return current.Date > value.Date;
}
public static bool IsBeforeDate(this DateTime current, DateTime value)
{
return current.Date < value.Date;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment