IsWeekend

edit

IsWeekend

Namespace

Summary== Checks to see if the date is Saturday or Sunday ==Example==if(DateTime.Today.IsWeekend()){ PartyLikeARockStar(); } ==Unit Test

public void IsWeekEndShouldBeTrueFor41809AndIsWeekDayShouldBeFalse() { var today = DateTime.Parse("4/18/2009"); Assert.False(today.IsWeekDay()); Assert.True(today.IsWeekEnd()); }

Comments

SubSonic 3.0 implements this as an extension on System.DateTime - 2.x uses a static method on SubSonic.Sugar.Dates.