getMinimalDaysInFirstWeek()
Returns the minimal days required in the first week of the year.
Syntax
Numeric getMinimalDaysInFirstWeek()
Usage
Calendar.fromDate(Date.fromIsoValue(orderline.orders.orderdate.isoValue),"YYYY-MM-DD").getMinimalDaysInFirstWeek()
This example populates a Decimal Format Box.
If the first week is defined as one that contains the first day of the first month of a year, this method returns 1. If the minimal days required must be a full week, this method returns 7.
Calendar
defines a locale-specific seven day week using two parameters: the
first day of the week and the minimal days in first week (from 1 to 7). These numbers are taken from
the locale resource data when a Calendar
is constructed. They may also be specified
explicitly through the methods for setting their values.
When setting or getting the WEEK_OF_MONTH
or WEEK_OF_YEAR
fields, Calendar
must determine the first week of the month or year as a reference
point. The first week of a month or year is defined as the earliest seven day period beginning on
getFirstDayOfWeek()
and containing at least
getMinimalDaysInFirstWeek()
days of that month or year. Weeks numbered -1 or 0
precede the first week; weeks numbered 2, or 3 follow it.