DateTime: No week 1 in 2021?

Here is a project file for the calendar week problem.
Features:

  • Select a region
  • Set week start on Sunday or Monday
  • Get the calendar week for the selected day

Download project file (zip)

Hi, thank you for your project. I allowed myself to add my routine - according to ISO it uses Monday as 1st day of week, anyway.

There you can select your routine as “Horst” and my - as “Pawel”. Please, kindly recognize how it shows days 1 or 2 of January 2020. It is 53rd week vs 1st.

If 1st day of January is Thursday or earlier - then the whole week is 1st week, not the 53rd or 52nd.

WeekOfYear2.xojo_binary_project.zip

1 Like