Option Strict On
Public Module WeekdayFunction
Public Sub Main
Dim holiday As Date = #01/01/2006#
If Weekday(holiday, FirstDayOfWeek.Monday) <= 5 Then
Console.WriteLine("The holiday on {0}, is during the work week.", _
FormatDateTime(holiday, DateFormat.LongDate))
Else
Console.WriteLine("The holiday on {0}, occurs during the weekend.", _
FormatDateTime(holiday, DateFormat.LongDate))
End If
End Sub
End Module
|