Home
last modified time | relevance | path

Searched refs:prolepticYear (Results 1 – 21 of 21) sorted by relevance

/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DCopticDate.java105 private final int prolepticYear; field in CopticDate
125 int prolepticYear = (int) (((epochDay * 4) + 1463) / 1461); in ofEpochDay() local
126 int startYearEpochDay = (prolepticYear - 1) * 365 + (prolepticYear / 4); in ofEpochDay()
130 return new CopticDate(prolepticYear, month, dom); in ofEpochDay()
133 private static CopticDate resolvePreviousValid(int prolepticYear, int month, int day) { in resolvePreviousValid() argument
135 day = CopticChronology.INSTANCE.isLeapYear(prolepticYear) ? 6 : 5; in resolvePreviousValid()
137 return new CopticDate(prolepticYear, month, day); in resolvePreviousValid()
149 CopticDate(int prolepticYear, int month, int dayOfMonth) { in CopticDate() argument
153 …range = CopticChronology.INSTANCE.isLeapYear(prolepticYear) ? CopticChronology.DOM_RANGE_LEAP : Co… in CopticDate()
159 this.prolepticYear = prolepticYear; in CopticDate()
[all …]
DCopticChronology.java174 public CopticDate date(int prolepticYear, int month, int dayOfMonth) { in date() argument
175 return new CopticDate(prolepticYear, month, dayOfMonth); in date()
179 public CopticDate dateYearDay(int prolepticYear, int dayOfYear) { in dateYearDay() argument
180 return new CopticDate(prolepticYear, (dayOfYear - 1) / 30 + 1, (dayOfYear - 1) % 30 + 1); in dateYearDay()
208 public boolean isLeapYear(long prolepticYear) { in isLeapYear() argument
209 return Math.floorMod(prolepticYear, 4) == 3; in isLeapYear()
213 public int prolepticYear(Era era, int yearOfEra) { in prolepticYear() method in CopticChronology
DTCKJapaneseChronology.java394 … assertEquals(JapaneseChronology.INSTANCE.prolepticYear(era, yearOfEra), expectedProlepticYear); in test_prolepticYear()
430 JapaneseChronology.INSTANCE.prolepticYear(era, yearOfEra); in test_prolepticYearError()
453 int year = JapaneseChronology.INSTANCE.prolepticYear(era, 1); in test_InvalidEras()
DTCKThaiBuddhistChronology.java307 …assertEquals(ThaiBuddhistChronology.INSTANCE.prolepticYear(era, yearOfEra), expectedProlepticYear); in test_prolepticYear()
355 int year = ThaiBuddhistChronology.INSTANCE.prolepticYear(era, 1); in test_InvalidEras()
DTCKMinguoChronology.java300 … assertEquals(MinguoChronology.INSTANCE.prolepticYear(era, yearOfEra), expectedProlepticYear); in test_prolepticYear()
348 int year = MinguoChronology.INSTANCE.prolepticYear(era, 1); in test_InvalidEras()
DTCKHijrahChronology.java192 int year = HijrahChronology.INSTANCE.prolepticYear(era, 1); in test_InvalidEras()
/libcore/ojluni/src/main/java/java/time/chrono/
DHijrahDate.java129 private final transient int prolepticYear; field in HijrahDate
150 …static HijrahDate of(HijrahChronology chrono, int prolepticYear, int monthOfYear, int dayOfMonth) { in of() argument
151 return new HijrahDate(chrono, prolepticYear, monthOfYear, dayOfMonth); in of()
228 public static HijrahDate of(int prolepticYear, int month, int dayOfMonth) { in of() argument
229 return HijrahChronology.INSTANCE.date(prolepticYear, month, dayOfMonth); in of()
263 … private HijrahDate(HijrahChronology chrono, int prolepticYear, int monthOfYear, int dayOfMonth) { in HijrahDate() argument
265 chrono.getEpochDay(prolepticYear, monthOfYear, dayOfMonth); in HijrahDate()
268 this.prolepticYear = prolepticYear; in HijrahDate()
282 this.prolepticYear = dateInfo[0]; in HijrahDate()
324 return chrono.getMonthLength(prolepticYear, monthOfYear); in lengthOfMonth()
[all …]
DIsoChronology.java194 return date(prolepticYear(era, yearOfEra), month, dayOfMonth); in date()
210 public LocalDate date(int prolepticYear, int month, int dayOfMonth) { in date() argument
211 return LocalDate.of(prolepticYear, month, dayOfMonth); in date()
225 return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear); in dateYearDay()
239 public LocalDate dateYearDay(int prolepticYear, int dayOfYear) { in dateYearDay() argument
240 return LocalDate.ofYearDay(prolepticYear, dayOfYear); in dateYearDay()
292 public long epochSecond(int prolepticYear, int month, int dayOfMonth, in epochSecond() argument
294 YEAR.checkValidValue(prolepticYear); in epochSecond()
302 int dom = numberOfDaysOfMonth(prolepticYear, month); in epochSecond()
305 …throw new DateTimeException("Invalid date 'February 29' as '" + prolepticYear + "' is not a leap y… in epochSecond()
[all …]
DHijrahChronology.java384 return date(prolepticYear(era, yearOfEra), month, dayOfMonth); in date()
398 public HijrahDate date(int prolepticYear, int month, int dayOfMonth) { in date() argument
399 return HijrahDate.of(this, prolepticYear, month, dayOfMonth); in date()
415 return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear); in dateYearDay()
429 public HijrahDate dateYearDay(int prolepticYear, int dayOfYear) { in dateYearDay() argument
430 HijrahDate date = HijrahDate.of(this, prolepticYear, 1, 1); in dateYearDay()
492 public boolean isLeapYear(long prolepticYear) { in isLeapYear() argument
494 if (prolepticYear < getMinimumYear() || prolepticYear > getMaximumYear()) { in isLeapYear()
497 int len = getYearLength((int) prolepticYear); in isLeapYear()
502 public int prolepticYear(Era era, int yearOfEra) { in prolepticYear() method in HijrahChronology
[all …]
DMinguoChronology.java177 return date(prolepticYear(era, yearOfEra), month, dayOfMonth); in date()
191 public MinguoDate date(int prolepticYear, int month, int dayOfMonth) { in date() argument
192 return new MinguoDate(LocalDate.of(prolepticYear + YEARS_DIFFERENCE, month, dayOfMonth)); in date()
208 return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear); in dateYearDay()
221 public MinguoDate dateYearDay(int prolepticYear, int dayOfYear) { in dateYearDay() argument
222 return new MinguoDate(LocalDate.ofYearDay(prolepticYear + YEARS_DIFFERENCE, dayOfYear)); in dateYearDay()
290 public boolean isLeapYear(long prolepticYear) { in isLeapYear() argument
291 return IsoChronology.INSTANCE.isLeapYear(prolepticYear + YEARS_DIFFERENCE); in isLeapYear()
295 public int prolepticYear(Era era, int yearOfEra) { in prolepticYear() method in MinguoChronology
DThaiBuddhistChronology.java213 return date(prolepticYear(era, yearOfEra), month, dayOfMonth); in date()
227 public ThaiBuddhistDate date(int prolepticYear, int month, int dayOfMonth) { in date() argument
228 … return new ThaiBuddhistDate(LocalDate.of(prolepticYear - YEARS_DIFFERENCE, month, dayOfMonth)); in date()
244 return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear); in dateYearDay()
257 public ThaiBuddhistDate dateYearDay(int prolepticYear, int dayOfYear) { in dateYearDay() argument
258 … return new ThaiBuddhistDate(LocalDate.ofYearDay(prolepticYear - YEARS_DIFFERENCE, dayOfYear)); in dateYearDay()
326 public boolean isLeapYear(long prolepticYear) { in isLeapYear() argument
327 return IsoChronology.INSTANCE.isLeapYear(prolepticYear - YEARS_DIFFERENCE); in isLeapYear()
331 public int prolepticYear(Era era, int yearOfEra) { in prolepticYear() method in ThaiBuddhistChronology
DChronology.java317 return date(prolepticYear(era, yearOfEra), month, dayOfMonth); in date()
330 ChronoLocalDate date(int prolepticYear, int month, int dayOfMonth); in date() argument
348 return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear); in dateYearDay()
360 ChronoLocalDate dateYearDay(int prolepticYear, int dayOfYear); in dateYearDay() argument
558 boolean isLeapYear(long prolepticYear); in isLeapYear() argument
576 int prolepticYear(Era era, int yearOfEra); in prolepticYear() method
739 public default long epochSecond(int prolepticYear, int month, int dayOfMonth, in epochSecond() argument
745 … long daysInSec = Math.multiplyExact(date(prolepticYear, month, dayOfMonth).toEpochDay(), 86400); in epochSecond()
771 …return epochSecond(prolepticYear(era, yearOfEra), month, dayOfMonth, hour, minute, second, zoneOff… in epochSecond()
DMinguoDate.java176 public static MinguoDate of(int prolepticYear, int month, int dayOfMonth) { in of() argument
177 return new MinguoDate(LocalDate.of(prolepticYear + YEARS_DIFFERENCE, month, dayOfMonth)); in of()
283 int prolepticYear = getProlepticYear(); in getLong() local
284 return (prolepticYear >= 1 ? prolepticYear : 1 - prolepticYear); in getLong()
DThaiBuddhistDate.java176 public static ThaiBuddhistDate of(int prolepticYear, int month, int dayOfMonth) { in of() argument
177 … return new ThaiBuddhistDate(LocalDate.of(prolepticYear - YEARS_DIFFERENCE, month, dayOfMonth)); in of()
283 int prolepticYear = getProlepticYear(); in getLong() local
284 return (prolepticYear >= 1 ? prolepticYear : 1 - prolepticYear); in getLong()
DJapaneseChronology.java232 public JapaneseDate date(int prolepticYear, int month, int dayOfMonth) { in date() argument
233 return new JapaneseDate(LocalDate.of(prolepticYear, month, dayOfMonth)); in date()
277 public JapaneseDate dateYearDay(int prolepticYear, int dayOfYear) { in dateYearDay() argument
278 return new JapaneseDate(LocalDate.ofYearDay(prolepticYear, dayOfYear)); in dateYearDay()
346 public boolean isLeapYear(long prolepticYear) { in isLeapYear() argument
347 return IsoChronology.INSTANCE.isLeapYear(prolepticYear); in isLeapYear()
351 public int prolepticYear(Era era, int yearOfEra) { in prolepticYear() method in JapaneseChronology
DJapaneseDate.java249 public static JapaneseDate of(int prolepticYear, int month, int dayOfMonth) { in of() argument
250 return new JapaneseDate(LocalDate.of(prolepticYear, month, dayOfMonth)); in of()
584 int year = JapaneseChronology.INSTANCE.prolepticYear(era, yearOfEra); in withYear()
DAbstractChronology.java495 addFieldValue(fieldValues, YEAR, prolepticYear(eraObj, yoe)); in resolveYearOfEra()
500 addFieldValue(fieldValues, YEAR, prolepticYear(chronoDate.getEra(), yoe)); in resolveYearOfEra()
511 addFieldValue(fieldValues, YEAR, prolepticYear(eraObj, yoe)); in resolveYearOfEra()
/libcore/luni/src/test/java/libcore/java/time/chrono/
DChronologyTest.java95 public ChronoLocalDate date(int prolepticYear, int month, int dayOfMonth) { in date() argument
100 public ChronoLocalDate dateYearDay(int prolepticYear, int dayOfYear) { in dateYearDay() argument
115 public boolean isLeapYear(long prolepticYear) { in isLeapYear() argument
120 public int prolepticYear(Era era, int yearOfEra) { in prolepticYear() method in ChronologyTest.FakeChronology
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestJapaneseChronology.java181 assertEquals(JAPANESE.prolepticYear(era, yearOfEra), gregorianYear); in test_transitions()
212 int year = JAPANESE.prolepticYear(era, yearOfEra); in test_invalidEraYear()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKYear.java820 int prolepticYear = IsoChronology.INSTANCE.prolepticYear(IsoEra.of(0), 5); in test_with() local
822 assertEquals(result.get(ChronoField.YEAR), prolepticYear); in test_with() local
/libcore/api/
Dcurrent.txt12324 method public int prolepticYear(java.time.chrono.Era, int);
12356 method public int prolepticYear(java.time.chrono.Era, int);
12415 method public int prolepticYear(java.time.chrono.Era, int);
12446 method public int prolepticYear(java.time.chrono.Era, int);
12511 method public int prolepticYear(java.time.chrono.Era, int);
12566 method public int prolepticYear(java.time.chrono.Era, int);