First Week of Year

1
how is the first week of the year determined in mendix? Below are few options i have found and need to know which is used by mendix • Starts on 1 January • First 4-day week • First full week
asked
1 answers
0

From Oracle (http://docs.oracle.com/javase/7/docs/api/java/util/GregorianCalendar.html)

The first week of a calendar year is the earliest seven day period starting on getFirstDayOfWeek() that contains at least getMinimalDaysInFirstWeek() days from that year. It thus depends on the values of getMinimalDaysInFirstWeek(), getFirstDayOfWeek(), and the day of the week of January 1.

The getFirstDayOfWeek() and getMinimalDaysInFirstWeek() values are initialized using locale-dependent resources when constructing a GregorianCalendar. The week determination is compatible with the ISO 8601 standard when getFirstDayOfWeek() is MONDAY and getMinimalDaysInFirstWeek() is 4, which values are used in locales where the standard is preferred.

In short, I think it depends on your locale. In the U.S., for example, the first day of the week is initialized to Sunday, while it is Monday in France.

If you are dealing with users only in your region, I would run a couple of tests in Java to see what the defaults are.

answered