APG.CodeHelper.DateTimeHelper.IsEndWork C# (CSharp) Method

IsEndWork() public static method

public static IsEndWork ( System.DateTime day, int second ) : bool
day System.DateTime
second int
return bool
        public static bool IsEndWork(DateTime day, int second)
        {
            // „исло секунд в одних сутках
            int DaySeconds = 24 * 60 * 60 - 2;
            //ƒл¤ зимнего и летнего переходов день - не стандартный
            if (day.Date == TimeZone.CurrentTimeZone.GetDaylightChanges(day.Year).Start.Date) DaySeconds = DaySeconds - 60 * 60 * GetChangeDelta(day.Year).Hours;
            if (day.Date == TimeZone.CurrentTimeZone.GetDaylightChanges(day.Year).End.Date) DaySeconds = DaySeconds + 60 * 60 * GetChangeDelta(day.Year).Hours;
            if (second >= DaySeconds) return true;
             else return false;
        }