13.11.2020 is week #45.
Sub AppStart (Args() As String)
DateTime.DateFormat = "dd.MM.yyyy"
Dim start As Long = DateUtils.SetDate(2020, 1, 1)
For i = 0 To 350
Dim p As Period
p.Days = i
Dim t As Long = DateUtils.AddPeriod(start, p)
If DateTime.GetDayOfWeek(t) = 2 Then
Log("********************")
End If
Log($"$Date{t}: Week #${GetWeekNumberStartingFromMonday(t)}, Day: ${DateUtils.GetDayOfWeekName(t)}"$)
Next
End Sub
Sub GetWeekNumberStartingFromMonday (ticks As Long) As Int
Dim WeekDayOfFirstDayOfYear As Int = DateTime.GetDayOfWeek(DateUtils.SetDate(DateTime.GetYear(ticks), 1, 1)) - 1
Dim FirstMondayInYear As Int = (7 + WeekDayOfFirstDayOfYear - 1) Mod 7
Dim result As Int
If WeekDayOfFirstDayOfYear <> 1 Then result = result - 1
result = result + Floor((DateTime.GetDayOfYear(ticks) - 1 + FirstMondayInYear) / 7) + 1
Return result
End Sub
01.01.2020: Week #0, Day: Wednesday
02.01.2020: Week #0, Day: Thursday
03.01.2020: Week #0, Day: Friday
04.01.2020: Week #0, Day: Saturday
05.01.2020: Week #0, Day: Sunday
********************
06.01.2020: Week #1, Day: Monday
07.01.2020: Week #1, Day: Tuesday
08.01.2020: Week #1, Day: Wednesday
09.01.2020: Week #1, Day: Thursday
10.01.2020: Week #1, Day: Friday
11.01.2020: Week #1, Day: Saturday
12.01.2020: Week #1, Day: Sunday
********************
13.01.2020: Week #2, Day: Monday
14.01.2020: Week #2, Day: Tuesday
15.01.2020: Week #2, Day: Wednesday
16.01.2020: Week #2, Day: Thursday
17.01.2020: Week #2, Day: Friday
18.01.2020: Week #2, Day: Saturday
19.01.2020: Week #2, Day: Sunday
********************
20.01.2020: Week #3, Day: Monday
21.01.2020: Week #3, Day: Tuesday
22.01.2020: Week #3, Day: Wednesday
23.01.2020: Week #3, Day: Thursday
24.01.2020: Week #3, Day: Friday
25.01.2020: Week #3, Day: Saturday
26.01.2020: Week #3, Day: Sunday
********************
27.01.2020: Week #4, Day: Monday
28.01.2020: Week #4, Day: Tuesday
29.01.2020: Week #4, Day: Wednesday
30.01.2020: Week #4, Day: Thursday
31.01.2020: Week #4, Day: Friday
01.02.2020: Week #4, Day: Saturday
02.02.2020: Week #4, Day: Sunday
********************
03.02.2020: Week #5, Day: Monday
04.02.2020: Week #5, Day: Tuesday
05.02.2020: Week #5, Day: Wednesday
06.02.2020: Week #5, Day: Thursday
07.02.2020: Week #5, Day: Friday
08.02.2020: Week #5, Day: Saturday
09.02.2020: Week #5, Day: Sunday
********************
10.02.2020: Week #6, Day: Monday
11.02.2020: Week #6, Day: Tuesday
12.02.2020: Week #6, Day: Wednesday
13.02.2020: Week #6, Day: Thursday
14.02.2020: Week #6, Day: Friday
15.02.2020: Week #6, Day: Saturday
16.02.2020: Week #6, Day: Sunday
********************
17.02.2020: Week #7, Day: Monday
18.02.2020: Week #7, Day: Tuesday
19.02.2020: Week #7, Day: Wednesday
20.02.2020: Week #7, Day: Thursday
21.02.2020: Week #7, Day: Friday
22.02.2020: Week #7, Day: Saturday
23.02.2020: Week #7, Day: Sunday
********************
24.02.2020: Week #8, Day: Monday
25.02.2020: Week #8, Day: Tuesday
26.02.2020: Week #8, Day: Wednesday
27.02.2020: Week #8, Day: Thursday
28.02.2020: Week #8, Day: Friday
29.02.2020: Week #8, Day: Saturday
01.03.2020: Week #8, Day: Sunday
********************
02.03.2020: Week #9, Day: Monday
03.03.2020: Week #9, Day: Tuesday
04.03.2020: Week #9, Day: Wednesday
05.03.2020: Week #9, Day: Thursday
06.03.2020: Week #9, Day: Friday
07.03.2020: Week #9, Day: Saturday
08.03.2020: Week #9, Day: Sunday
********************
09.03.2020: Week #10, Day: Monday
10.03.2020: Week #10, Day: Tuesday
11.03.2020: Week #10, Day: Wednesday
12.03.2020: Week #10, Day: Thursday
13.03.2020: Week #10, Day: Friday
14.03.2020: Week #10, Day: Saturday
15.03.2020: Week #10, Day: Sunday
********************
16.03.2020: Week #11, Day: Monday
17.03.2020: Week #11, Day: Tuesday
18.03.2020: Week #11, Day: Wednesday
19.03.2020: Week #11, Day: Thursday
20.03.2020: Week #11, Day: Friday
21.03.2020: Week #11, Day: Saturday
22.03.2020: Week #11, Day: Sunday
********************
23.03.2020: Week #12, Day: Monday
24.03.2020: Week #12, Day: Tuesday
25.03.2020: Week #12, Day: Wednesday
26.03.2020: Week #12, Day: Thursday
27.03.2020: Week #12, Day: Friday
28.03.2020: Week #12, Day: Saturday
29.03.2020: Week #12, Day: Sunday
********************
30.03.2020: Week #13, Day: Monday
31.03.2020: Week #13, Day: Tuesday
01.04.2020: Week #13, Day: Wednesday
02.04.2020: Week #13, Day: Thursday
03.04.2020: Week #13, Day: Friday
04.04.2020: Week #13, Day: Saturday
05.04.2020: Week #13, Day: Sunday
********************
06.04.2020: Week #14, Day: Monday
07.04.2020: Week #14, Day: Tuesday
08.04.2020: Week #14, Day: Wednesday
09.04.2020: Week #14, Day: Thursday
10.04.2020: Week #14, Day: Friday
11.04.2020: Week #14, Day: Saturday
12.04.2020: Week #14, Day: Sunday
********************
13.04.2020: Week #15, Day: Monday
14.04.2020: Week #15, Day: Tuesday
15.04.2020: Week #15, Day: Wednesday
16.04.2020: Week #15, Day: Thursday
17.04.2020: Week #15, Day: Friday
18.04.2020: Week #15, Day: Saturday
19.04.2020: Week #15, Day: Sunday
********************
20.04.2020: Week #16, Day: Monday
21.04.2020: Week #16, Day: Tuesday
22.04.2020: Week #16, Day: Wednesday
23.04.2020: Week #16, Day: Thursday
24.04.2020: Week #16, Day: Friday
25.04.2020: Week #16, Day: Saturday
26.04.2020: Week #16, Day: Sunday
********************
27.04.2020: Week #17, Day: Monday
28.04.2020: Week #17, Day: Tuesday
29.04.2020: Week #17, Day: Wednesday
30.04.2020: Week #17, Day: Thursday
01.05.2020: Week #17, Day: Friday
02.05.2020: Week #17, Day: Saturday
03.05.2020: Week #17, Day: Sunday
********************
04.05.2020: Week #18, Day: Monday
05.05.2020: Week #18, Day: Tuesday
06.05.2020: Week #18, Day: Wednesday
07.05.2020: Week #18, Day: Thursday
08.05.2020: Week #18, Day: Friday
09.05.2020: Week #18, Day: Saturday
10.05.2020: Week #18, Day: Sunday
********************
11.05.2020: Week #19, Day: Monday
12.05.2020: Week #19, Day: Tuesday
13.05.2020: Week #19, Day: Wednesday
14.05.2020: Week #19, Day: Thursday
15.05.2020: Week #19, Day: Friday
16.05.2020: Week #19, Day: Saturday
17.05.2020: Week #19, Day: Sunday
********************
18.05.2020: Week #20, Day: Monday
19.05.2020: Week #20, Day: Tuesday
20.05.2020: Week #20, Day: Wednesday
21.05.2020: Week #20, Day: Thursday
22.05.2020: Week #20, Day: Friday
23.05.2020: Week #20, Day: Saturday
24.05.2020: Week #20, Day: Sunday
********************
25.05.2020: Week #21, Day: Monday
26.05.2020: Week #21, Day: Tuesday
27.05.2020: Week #21, Day: Wednesday
28.05.2020: Week #21, Day: Thursday
29.05.2020: Week #21, Day: Friday
30.05.2020: Week #21, Day: Saturday
31.05.2020: Week #21, Day: Sunday
********************
01.06.2020: Week #22, Day: Monday
02.06.2020: Week #22, Day: Tuesday
03.06.2020: Week #22, Day: Wednesday
04.06.2020: Week #22, Day: Thursday
05.06.2020: Week #22, Day: Friday
06.06.2020: Week #22, Day: Saturday
07.06.2020: Week #22, Day: Sunday
********************
08.06.2020: Week #23, Day: Monday
09.06.2020: Week #23, Day: Tuesday
10.06.2020: Week #23, Day: Wednesday
11.06.2020: Week #23, Day: Thursday
12.06.2020: Week #23, Day: Friday
13.06.2020: Week #23, Day: Saturday
14.06.2020: Week #23, Day: Sunday
********************
15.06.2020: Week #24, Day: Monday
16.06.2020: Week #24, Day: Tuesday
17.06.2020: Week #24, Day: Wednesday
18.06.2020: Week #24, Day: Thursday
19.06.2020: Week #24, Day: Friday
20.06.2020: Week #24, Day: Saturday
21.06.2020: Week #24, Day: Sunday
********************
22.06.2020: Week #25, Day: Monday
23.06.2020: Week #25, Day: Tuesday
24.06.2020: Week #25, Day: Wednesday
25.06.2020: Week #25, Day: Thursday
26.06.2020: Week #25, Day: Friday
27.06.2020: Week #25, Day: Saturday
28.06.2020: Week #25, Day: Sunday
********************
29.06.2020: Week #26, Day: Monday
30.06.2020: Week #26, Day: Tuesday
01.07.2020: Week #26, Day: Wednesday
02.07.2020: Week #26, Day: Thursday
03.07.2020: Week #26, Day: Friday
04.07.2020: Week #26, Day: Saturday
05.07.2020: Week #26, Day: Sunday
********************
06.07.2020: Week #27, Day: Monday
07.07.2020: Week #27, Day: Tuesday
08.07.2020: Week #27, Day: Wednesday
09.07.2020: Week #27, Day: Thursday
10.07.2020: Week #27, Day: Friday
11.07.2020: Week #27, Day: Saturday
12.07.2020: Week #27, Day: Sunday
********************
13.07.2020: Week #28, Day: Monday
14.07.2020: Week #28, Day: Tuesday
15.07.2020: Week #28, Day: Wednesday
16.07.2020: Week #28, Day: Thursday
17.07.2020: Week #28, Day: Friday
18.07.2020: Week #28, Day: Saturday
19.07.2020: Week #28, Day: Sunday
********************
20.07.2020: Week #29, Day: Monday
21.07.2020: Week #29, Day: Tuesday
22.07.2020: Week #29, Day: Wednesday
23.07.2020: Week #29, Day: Thursday
24.07.2020: Week #29, Day: Friday
25.07.2020: Week #29, Day: Saturday
26.07.2020: Week #29, Day: Sunday
********************
27.07.2020: Week #30, Day: Monday
28.07.2020: Week #30, Day: Tuesday
29.07.2020: Week #30, Day: Wednesday
30.07.2020: Week #30, Day: Thursday
31.07.2020: Week #30, Day: Friday
01.08.2020: Week #30, Day: Saturday
02.08.2020: Week #30, Day: Sunday
********************
03.08.2020: Week #31, Day: Monday
04.08.2020: Week #31, Day: Tuesday
05.08.2020: Week #31, Day: Wednesday
06.08.2020: Week #31, Day: Thursday
07.08.2020: Week #31, Day: Friday
08.08.2020: Week #31, Day: Saturday
09.08.2020: Week #31, Day: Sunday
********************
10.08.2020: Week #32, Day: Monday
11.08.2020: Week #32, Day: Tuesday
12.08.2020: Week #32, Day: Wednesday
13.08.2020: Week #32, Day: Thursday
14.08.2020: Week #32, Day: Friday
15.08.2020: Week #32, Day: Saturday
16.08.2020: Week #32, Day: Sunday
********************
17.08.2020: Week #33, Day: Monday
18.08.2020: Week #33, Day: Tuesday
19.08.2020: Week #33, Day: Wednesday
20.08.2020: Week #33, Day: Thursday
21.08.2020: Week #33, Day: Friday
22.08.2020: Week #33, Day: Saturday
23.08.2020: Week #33, Day: Sunday
********************
24.08.2020: Week #34, Day: Monday
25.08.2020: Week #34, Day: Tuesday
26.08.2020: Week #34, Day: Wednesday
27.08.2020: Week #34, Day: Thursday
28.08.2020: Week #34, Day: Friday
29.08.2020: Week #34, Day: Saturday
30.08.2020: Week #34, Day: Sunday
********************
31.08.2020: Week #35, Day: Monday
01.09.2020: Week #35, Day: Tuesday
02.09.2020: Week #35, Day: Wednesday
03.09.2020: Week #35, Day: Thursday
04.09.2020: Week #35, Day: Friday
05.09.2020: Week #35, Day: Saturday
06.09.2020: Week #35, Day: Sunday
********************
07.09.2020: Week #36, Day: Monday
08.09.2020: Week #36, Day: Tuesday
09.09.2020: Week #36, Day: Wednesday
10.09.2020: Week #36, Day: Thursday
11.09.2020: Week #36, Day: Friday
12.09.2020: Week #36, Day: Saturday
13.09.2020: Week #36, Day: Sunday
********************
14.09.2020: Week #37, Day: Monday
15.09.2020: Week #37, Day: Tuesday
16.09.2020: Week #37, Day: Wednesday
17.09.2020: Week #37, Day: Thursday
18.09.2020: Week #37, Day: Friday
19.09.2020: Week #37, Day: Saturday
20.09.2020: Week #37, Day: Sunday
********************
21.09.2020: Week #38, Day: Monday
22.09.2020: Week #38, Day: Tuesday
23.09.2020: Week #38, Day: Wednesday
24.09.2020: Week #38, Day: Thursday
25.09.2020: Week #38, Day: Friday
26.09.2020: Week #38, Day: Saturday
27.09.2020: Week #38, Day: Sunday
********************
28.09.2020: Week #39, Day: Monday
29.09.2020: Week #39, Day: Tuesday
30.09.2020: Week #39, Day: Wednesday
01.10.2020: Week #39, Day: Thursday
02.10.2020: Week #39, Day: Friday
03.10.2020: Week #39, Day: Saturday
04.10.2020: Week #39, Day: Sunday
********************
05.10.2020: Week #40, Day: Monday
06.10.2020: Week #40, Day: Tuesday
07.10.2020: Week #40, Day: Wednesday
08.10.2020: Week #40, Day: Thursday
09.10.2020: Week #40, Day: Friday
10.10.2020: Week #40, Day: Saturday
11.10.2020: Week #40, Day: Sunday
********************
12.10.2020: Week #41, Day: Monday
13.10.2020: Week #41, Day: Tuesday
14.10.2020: Week #41, Day: Wednesday
15.10.2020: Week #41, Day: Thursday
16.10.2020: Week #41, Day: Friday
17.10.2020: Week #41, Day: Saturday
18.10.2020: Week #41, Day: Sunday
********************
19.10.2020: Week #42, Day: Monday
20.10.2020: Week #42, Day: Tuesday
21.10.2020: Week #42, Day: Wednesday
22.10.2020: Week #42, Day: Thursday
23.10.2020: Week #42, Day: Friday
24.10.2020: Week #42, Day: Saturday
25.10.2020: Week #42, Day: Sunday
********************
26.10.2020: Week #43, Day: Monday
27.10.2020: Week #43, Day: Tuesday
28.10.2020: Week #43, Day: Wednesday
29.10.2020: Week #43, Day: Thursday
30.10.2020: Week #43, Day: Friday
31.10.2020: Week #43, Day: Saturday
01.11.2020: Week #43, Day: Sunday
********************
02.11.2020: Week #44, Day: Monday
03.11.2020: Week #44, Day: Tuesday
04.11.2020: Week #44, Day: Wednesday
05.11.2020: Week #44, Day: Thursday
06.11.2020: Week #44, Day: Friday
07.11.2020: Week #44, Day: Saturday
08.11.2020: Week #44, Day: Sunday
********************
09.11.2020: Week #45, Day: Monday
10.11.2020: Week #45, Day: Tuesday
11.11.2020: Week #45, Day: Wednesday
12.11.2020: Week #45, Day: Thursday
13.11.2020: Week #45, Day: Friday
14.11.2020: Week #45, Day: Saturday
15.11.2020: Week #45, Day: Sunday
********************
16.11.2020: Week #46, Day: Monday
17.11.2020: Week #46, Day: Tuesday
18.11.2020: Week #46, Day: Wednesday
19.11.2020: Week #46, Day: Thursday
20.11.2020: Week #46, Day: Friday
21.11.2020: Week #46, Day: Saturday
22.11.2020: Week #46, Day: Sunday
********************
23.11.2020: Week #47, Day: Monday
24.11.2020: Week #47, Day: Tuesday
25.11.2020: Week #47, Day: Wednesday
26.11.2020: Week #47, Day: Thursday
27.11.2020: Week #47, Day: Friday
28.11.2020: Week #47, Day: Saturday
29.11.2020: Week #47, Day: Sunday
********************
30.11.2020: Week #48, Day: Monday
01.12.2020: Week #48, Day: Tuesday
02.12.2020: Week #48, Day: Wednesday
03.12.2020: Week #48, Day: Thursday
04.12.2020: Week #48, Day: Friday
05.12.2020: Week #48, Day: Saturday
06.12.2020: Week #48, Day: Sunday
********************
07.12.2020: Week #49, Day: Monday
08.12.2020: Week #49, Day: Tuesday
09.12.2020: Week #49, Day: Wednesday
10.12.2020: Week #49, Day: Thursday
11.12.2020: Week #49, Day: Friday
12.12.2020: Week #49, Day: Saturday
13.12.2020: Week #49, Day: Sunday
********************
14.12.2020: Week #50, Day: Monday
15.12.2020: Week #50, Day: Tuesday
16.12.2020: Week #50, Day: Wednesday