Support Article
First day of the week cannot be set as Monday
Summary
In report definitions, when 'previous week' is selected as a filter criteria, the week starts from Sunday.
User need to change the first day of week to Monday from Sunday.
Following the PDN article in the link below, User changed the default locale of operator to tr_TR but that did not help.
https://pdn.pega.com/community/pega-product-support/question/how-change-start-date-calendar
Error Messages
Not Applicable
Steps to Reproduce
- Create a report definition.
- Add filter condition.
- From Select values button choose previous week.
Root Cause
In the the JVM settings of the application the user.countyry parameter is pointed to a different country.
Thus Java Calendar methods is working as per the locale set in the JVM based on the user.country argument.
Resolution
Make the following change to the operating environment:
The below report is executed from Pega Designer Studio. In this report the filter criteria is greater than “Previous Week” on a datetime filled.
![](https://gcsprdsa.lab.pega.com/articles/datacontent/Image/rteImages/UserUpload_15136809207281513680920993.png)
Below are the SQL query generated for two different JVM settings.
- Case 1: user country = GB, Monday is the first day of the week.
- Case2: country = US, Sunday is the first day of the week.
In the above report execution for country = GB the report fetches data from 18th December 2017 00:00:000 hours which is Monday and the first date of the week as per the JVM Locale settings.
For the second case that is, country = US the report fetches data from 17th December 2017 00:00:000 hours which is Sunday and the first date of the week as per the jvm Locale settings.
The user country must be set to enforce locale from the JVM level so that Java Calendar methods work accordingly.
The JVM argument is –Duser.country=X. (X = IN, GB, TR, US, and so on)
The language JVM argument is –Duser.language=Y (Y = tr, fr, en, and so on).
Published February 15, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.