Use relative date filters for weeks to control the starting day of the week, the number of days comprising the first calendar week, and the starting calendar week of each year. If your week number and week year are required to be ISO8601 week-date compliant, or if you need to account for cultural time-keeping differences, you can customize how week numbers and week years are generated for the w and YYYY format strings.
Configure the following filter.relative.dates.week properties in the analyzer.properties file:
Property | Description | Default value |
---|---|---|
filter.relative.dates.week.firstDayOfWeek | Specifies the first day of the week. Values are Sunday=1, Monday=2, Tuesday=3, Wednesday=4, Thursday=5, Friday=6, and Saturday=7. | 2 |
filter.relative.dates.week.minimalDaysInFirstWeek | Specifies the number of days considered to define the first week of a year. The ISO8601 standard requires 4 days to be present before counting the first week. | 4 |
filter.relative.dates.week.firstWeekOnJanuary1st | Specifies the week number so that the first week of the calendar always starts on January 1st. When this property is set to true, the week year and the calendar year are the same. | false |
filter.relative.dates.week.firstWeekOnJanuary1st.fromOne | If filter.relative.dates.week.firstWeekOnJanuary1st=true and the first week does not have the minimal number of days, this property specifies if week numbering should start at 0 or 1. | false |
For example, an alternative method for week numbering commonly used in the United States starts week 1 of every year on January 1st with the first day of all subsequent weeks starting on a Sunday. For this method, configure the following properties with the associated values:
- filter.relative.dates.week.firstDayOfWeek=1
- filter.relative.dates.week.minimalDaysInFirstWeek=4
- filter.relative.dates.week.firstWeekOnJanuary1st=true
- filter.relative.dates.week.firstWeekOnJanuary1st.fromOne=true