Today I got a bug. A user told me, that the weekday name output is not correct. In detail, the weekday name was shifted one day.
Have a look at the following line. At the first impression this looks very fine, but it has a pit fall.
= WeekdayName(Weekday(LogonDate.Value), true)
The default assumption for WeekdayName is, that the first day is FirstDayOfWeek.System.
The default assumption for Weekday is, that the first day is FirstDayOfWeek.Sunday.
That’s cruel.
To correct this, the line must look like this:
= WeekdayName(Weekday(LogonDate.Value), true, FirstDayOfWeek.Sunday)
That was such unexpected for me that I thought I’m going to share this with you.
Cheers
- Gerhard