AndVGri
Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Public Function TodayIsLastDayWork() As Boolean Dim vDate As Date = Date.Today() Dim vYear As Integer = vDate.Year Dim vMonth As Integer = vDate.Month Dim vLastDay As Integer = Date.DaysInMonth(vYear, vMonth) Dim vLastDate As Date = DateSerial(vYear, vMonth, vLastDay) Select Case vLastDate.DayOfWeek Case DayOfWeek.Saturday vLastDate = vLastDate.AddDays(-1.0R) Case DayOfWeek.Sunday vLastDate = vLastDate.AddDays(-2.0R) End Select If vDate.CompareTo(vLastDate) = 0I Then Return True Else Return False End If End Function |