Skip to content

Instantly share code, notes, and snippets.

@DexterHaslem
Created July 17, 2013 17:02
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 DexterHaslem/6022425 to your computer and use it in GitHub Desktop.
Save DexterHaslem/6022425 to your computer and use it in GitHub Desktop.
is it softs contract expiration party time?
private static bool IsLastBusinessDayOfMonth(DateTime date, int day)
{
if (day > DateTime.DaysInMonth(date.Year, date.Month))
return false;
DayOfWeek dayOfWeek = new DateTime(date.Year, date.Month, day).DayOfWeek;
return dayOfWeek != DayOfWeek.Sunday && dayOfWeek != DayOfWeek.Saturday;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment