' Vorbereiten
Dim dtstrORG As String = DateTime.DeviceDefaultDateFormat
Dim tstrORG As String = DateTime.DeviceDefaultTimeFormat
Dim heute As Long = DateTime.Now
Dim result(7) As Int
Dim TagNamen(7) As String
TagNamen(0) = "Sonntag"
TagNamen(1) = "Montag"
TagNamen(2) = "Dienstag"
TagNamen(3) = "Mittwoch"
TagNamen(4) = "Donnerstag"
TagNamen(5) = "Freitag"
TagNamen(6) = "Samstag"
For i = 0 To 6
result(i) = 0
Next
DateTime.DateFormat = "dd.MM.yyyy"
DateTime.TimeFormat = "EEE"
'Dim DStr As String = "05.10.2015"
'Dim d As Long = DateTime.DateParse(DStr)
Dim tage As Int = DateUtils.NumberOfDaysInMonth(DateTime.GetMonth(heute),DateTime.GetYear(heute))
For i = 1 To tage
Dim DStr As String = $"$2.0{i}.$2.0{DateTime.GetMonth(heute)}.${DateTime.GetYear(heute)}"$
Log(DStr)
Dim tag As Long = DateTime.DateParse(DStr)
result(DateTime.GetDayOfWeek(tag)-1) = result(DateTime.GetDayOfWeek(tag)-1)+1
'Log(DateTime.Time(tag))
Next
For i = 0 To 6
Log(result(i)&" X "&TagNamen(i))
Next
' Rastaurieren
DateTime.DateFormat = dtstrORG
DateTime.TimeFormat = tstrORG