MCPcopy Create free account
hub / github.com/apache/orc / create

Method create

java/core/src/java/org/threeten/extra/chrono/HybridDate.java:218–230  ·  view source on GitHub ↗

Creates a HybridDate validating the input. @param prolepticYear the British Cutover proleptic-year @param month the British Cutover month-of-year, from 1 to 12 @param dayOfMonth the British Cutover day-of-month, from 1 to 31 @return the date in British Cutover calendar system, no

(int prolepticYear, int month, int dayOfMonth)

Source from the content-addressed store, hash-verified

216 * or if the day-of-month is invalid for the month-year
217 */
218 static HybridDate create(int prolepticYear, int month, int dayOfMonth) {
219 if (prolepticYear < CUTOVER_YEAR) {
220 JulianDate julian = JulianDate.of(prolepticYear, month, dayOfMonth);
221 return new HybridDate(julian);
222 } else {
223 LocalDate iso = LocalDate.of(prolepticYear, month, dayOfMonth);
224 if (iso.isBefore(CUTOVER)) {
225 JulianDate julian = JulianDate.of(prolepticYear, month, dayOfMonth);
226 return new HybridDate(julian);
227 }
228 return new HybridDate(iso);
229 }
230 }
231
232 //-----------------------------------------------------------------------
233

Callers 2

ofMethod · 0.95
resolvePreviousMethod · 0.95

Calls 1

ofMethod · 0.80

Tested by

no test coverage detected