public class CommonElements extends Object
Defines access to elements which can be used by all calendars defined in this package.
| Modifier and Type | Field and Description |
|---|---|
static ChronoElement<Integer> |
RELATED_GREGORIAN_YEAR
Represents the related gregorian year which corresponds to the start
of any given non-gregorian calendar year.
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends ChronoEntity<T> & CalendarDate> |
boundedWeekOfMonth(Chronology<T> chronology,
Weekmodel model)
Creates an integer element for the week of month in given chronology dependent on given week model
and constrained by month boundaries.
|
static <T extends ChronoEntity<T> & CalendarDate> |
boundedWeekOfYear(Chronology<T> chronology,
Weekmodel model)
Creates an integer element for the week of year in given chronology dependent on given week model
and constrained by year boundaries.
|
static <T extends ChronoEntity<T> & CalendarDate> |
localDayOfWeek(Chronology<T> chronology,
Weekmodel model)
Defines an element for the weekday with a localized day number in
the value range
1-7. |
static <T extends ChronoEntity<T> & CalendarDate> |
weekOfMonth(Chronology<T> chronology,
Weekmodel model)
Creates an integer element for the week of month in given chronology dependent on given week model.
|
static <T extends ChronoEntity<T> & CalendarDate> |
weekOfYear(Chronology<T> chronology,
Weekmodel model)
Creates an integer element for the week of year in given chronology dependent on given week model.
|
@FormattableElement(format="r") public static final ChronoElement<Integer> RELATED_GREGORIAN_YEAR
Represents the related gregorian year which corresponds to the start of any given non-gregorian calendar year.
The element is read-only.
@FormattableElement(format="e", alt="c") public static <T extends ChronoEntity<T> & CalendarDate> StdCalendarElement<Weekday,T> localDayOfWeek(Chronology<T> chronology, Weekmodel model)
Defines an element for the weekday with a localized day number in
the value range 1-7.
The given chronology must support a 7-day-week with an element of name "DAY_OF_WEEK" otherwise an exception will be thrown.
This element defines localized weekday numbers in numerical formatting
and also a localized sorting order of weekdays, but still manages values
of type Weekday. However, the value range with its minimum and
maximum is localized, too, i.e. the element defines as minium the value
getFirstDayOfWeek().
T - chronological typechronology - the calendrical chronologymodel - the underlying week modelIllegalArgumentException - if the chronology does not support this element@FormattableElement(format="w") public static <T extends ChronoEntity<T> & CalendarDate> StdCalendarElement<Integer,T> weekOfYear(Chronology<T> chronology, Weekmodel model)
Creates an integer element for the week of year in given chronology dependent on given week model.
The given chronology must support a 7-day-week with elements of names "DAY_OF_WEEK" and "DAY_OF_YEAR", otherwise an exception will be thrown.
T - chronological typechronology - the calendrical chronologymodel - the underlying week modelIllegalArgumentException - if the chronology does not support this element@FormattableElement(format="W") public static <T extends ChronoEntity<T> & CalendarDate> StdCalendarElement<Integer,T> weekOfMonth(Chronology<T> chronology, Weekmodel model)
Creates an integer element for the week of month in given chronology dependent on given week model.
The given chronology must support a 7-day-week with elements of names "DAY_OF_WEEK" and "DAY_OF_MONTH", otherwise an exception will be thrown.
T - chronological typechronology - the calendar chronologymodel - the underlying week modelIllegalArgumentException - if the chronology does not support this elementpublic static <T extends ChronoEntity<T> & CalendarDate> StdCalendarElement<Integer,T> boundedWeekOfYear(Chronology<T> chronology, Weekmodel model)
Creates an integer element for the week of year in given chronology dependent on given week model and constrained by year boundaries.
The given chronology must support a 7-day-week with elements of names "DAY_OF_WEEK" and "DAY_OF_YEAR", otherwise an exception will be thrown.
T - chronological typechronology - the calendrical chronologymodel - the underlying week modelIllegalArgumentException - if the chronology does not support this elementpublic static <T extends ChronoEntity<T> & CalendarDate> StdCalendarElement<Integer,T> boundedWeekOfMonth(Chronology<T> chronology, Weekmodel model)
Creates an integer element for the week of month in given chronology dependent on given week model and constrained by month boundaries.
The given chronology must support a 7-day-week with elements of names "DAY_OF_WEEK" and "DAY_OF_MONTH", otherwise an exception will be thrown.
T - chronological typechronology - the calendar chronologymodel - the underlying week modelIllegalArgumentException - if the chronology does not support this elementCopyright © 2014–2021. All rights reserved.