I'm working on figuring out what the current 'business' day of the month it is. So sayFor instance, if it's the 20th, but there are 3 weekends, it would be the 14th business day of the month. The following is what I have.
Is there a better way of doing this?
var first = DateTime.Today.FirstDayOfMonth();
var businessDayOfMonth = 0;
for (var i = first; i <= DateTime.Today; i = i.AddDays(1))
{
if (i.DayOfWeek != DayOfWeek.Saturday && i.DayOfWeek != DayOfWeek.Sunday)
businessDayOfMonth++;
}
Is there a better way of doing this?