Weekofyear is wrong for germany

the weekofyear seems wrong for germany, can somebody agree?
at least at this one printed which hang at office wall show 17. and my calendar at home too.

Var d As New DateTime(2021,4,26,0,0,0,0) ' 26.04.2021
MessageBox "WeekOfYear = " + d.WeekOfYear.ToString + " (should be 17 not 18)"

Xojo 2021r1.1

Germany see Middle East, the international ISO 8601 standard



Die Kalenderwoche ist nach ISO 8601 so definiert: Kalenderwochen haben 7 Tage, beginnen an einem Montag und werden über das Jahr fortlaufend nummeriert. Die Kalenderwoche 1 eines Jahres ist diejenige, die den ersten Donnerstag enthält.

11024 - WeekOfYear not international savvy
63292 - Weekofyear incorrectly calculated for 2021

1 Like

great … 11 years or
5 months later and nothing happened

Yes, hard to understand.
There’s certainly a workaround by adding 1 if the day is Sunday, and finding which day number is the first Thursday, but I don’t see the point of having functions that won’t work outside of the USA (and that aren’t fixed 10 years later; I won’t believe each supported OS today doesn’t support internationalised dates out of the box)…

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.