Created
October 5, 2018 15:22
-
-
Save JamesIgoe/5c5b867bf2b3bb9d4a663c88f11ed0eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class DateHelpers | |
Public Shared Function GetNextWeekday(ByVal start As DateTime, ByVal day As DayOfWeek) As Integer | |
Return (CInt(day) - CInt(start.DayOfWeek) + 7) Mod 7 | |
End Function | |
Public Shared Function DateWeek(item As Date) As Integer | |
Dim temp = DatePart(DateInterval.WeekOfYear, item, FirstDayOfWeek.Sunday, FirstWeekOfYear.FirstFourDays) | |
Return temp | |
End Function | |
End Class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment