IsWeekDay
IsWeekDay
Namespace
Summary== Checks to see if the date is a week day (Mon - Fri) ==Example==if(DateTime.Today.IsWeekday()){ GoToWork(); } ==Unit Test
public void IsWeekDayShouldBeTrueFor41609AndIsWeekendShouldBeFalse() { var today = DateTime.Parse("4/16/2009"); Assert.True(today.IsWeekDay()); Assert.False(today.IsWeekEnd()); }
Comments
SubSonic 3.0 implements this as an extension on System.DateTime - 2.x uses a static method on SubSonic.Sugar.Dates.