[Extended DateTime] Wrong start of week
Forge component by Matthias Preuter
Published on 08 Aug 2019
Application Type
Traditional Web

Hi guys,

So I think I may have found a bug in the component.

If I use the action WeekNumber with the dates 2020-12-28 and 2021-01-04, with the default values, I will get the respective week number 53 and 1. This is correct!

Now if I use the StartOfWeek action with default values (they are the same) for week 53 2020 and 1 2021, I get the start of week 2020-12-28, correct, but I get 2021-01-11 for week 1 2021, wrong! the start of week for 1 2021 should be 2021-01-04.

Rank: #51

Hi Mikael,

I checked the component and is giving the correct week , there is one parameter week rule , if you pass the week rule value as 1 it will return the correct value.



Rank: #478

Thanks for reaching out PJ,

As I mentioned, I want my last week of 2020 to be the week 53 and I don't think rule 1 will allow this.

Rank: #6239

Hi, I believe there is actually a bug:

With the same settings, one function gives that 2019-12-30 is week 53, but the other function puts it on week 1 of the following year.

if https://en.wikipedia.org/wiki/ISO_week_date is to be followed, the expected result for the WeekNumber function would be 1.