Skip to content

Instantly share code, notes, and snippets.

@jittuu
Created June 26, 2011 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jittuu/1047322 to your computer and use it in GitHub Desktop.
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