CSharp examples for System:DateTime Week
Is Weekend
// Copyright (c) 2014-2015 OSharp. All rights reserved. using System.Linq; using System;/*w ww. j a va2 s . c om*/ public class Main{ public static bool IsWeekend(this DateTime dateTime) { DayOfWeek[] weeks = { DayOfWeek.Saturday, DayOfWeek.Sunday }; return weeks.Contains(dateTime.DayOfWeek); } }