Home
last modified time | relevance | path

Searched refs:getYear (Results 1 – 25 of 55) sorted by relevance

123

/libcore/ojluni/src/main/java/sun/util/calendar/
DLocalGregorianCalendar.java75 if (getYear() != localYear) { in setYear()
112 sb.append(getYear()).append('.'); in toString()
223 int y = ldate.getNormalizedYear() - era.getSinceDate().getYear() + 1; in adjustYear()
254 ldate.setNormalizedYear(era.getSinceDate().getYear() + ldate.getYear() - 1); in validate()
256 tmp.setEra(era).setDate(date.getYear(), date.getMonth(), date.getDayOfMonth()); in validate()
262 if (date.getYear() >= eras[0].getSinceDate().getYear()) { in validate()
265 ldate.setNormalizedYear(ldate.getYear()); in validate()
301 int sinceYear = sinceDate.getYear(); in normalize()
342 int y = ldate.getNormalizedYear() - era.getSinceDate().getYear() + 1; in normalize()
366 ldate.setNormalizedYear(ldate.getYear()); in normalizeYear()
[all …]
DJulianCalendar.java75 return 1 - getYear(); in getNormalizedYear()
77 return getYear(); in getNormalizedYear()
105 sb.append(getYear()).append('-'); in toString()
DImmutableGregorianDate.java49 public int getYear() { in getYear() method in ImmutableGregorianDate
50 return date.getYear(); in getYear()
DCalendarDate.java122 public int getYear() { in getYear() method in CalendarDate
380 && getYear() == date.getYear() in isSameDate()
DGregorian.java49 return getYear(); in getNormalizedYear()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKTemporalAdjusters.java116 assertEquals(test.getYear(), 2007); in test_firstDayOfMonth_nonLeap()
129 assertEquals(test.getYear(), 2008); in test_firstDayOfMonth_leap()
150 assertEquals(test.getYear(), 2007); in test_lastDayOfMonth_nonLeap()
163 assertEquals(test.getYear(), 2008); in test_lastDayOfMonth_leap()
184 assertEquals(test.getYear(), month == DECEMBER ? 2008 : 2007); in test_firstDayOfNextMonth_nonLeap()
197 assertEquals(test.getYear(), month == DECEMBER ? 2009 : 2008); in test_firstDayOfNextMonth_leap()
218 assertEquals(test.getYear(), 2007); in test_firstDayOfYear_nonLeap()
231 assertEquals(test.getYear(), 2008); in test_firstDayOfYear_leap()
252 assertEquals(test.getYear(), 2007); in test_lastDayOfYear_nonLeap()
265 assertEquals(test.getYear(), 2008); in test_lastDayOfYear_leap()
[all …]
DTCKIsoFields.java161 LocalDate parsed = LocalDate.parse(date.getYear() + "-" + qoy + "-" + doq, f); in test_parse_quarters()
172 LocalDate parsed = LocalDate.parse(date.getYear() + "-" + qoy + "-" + doq, f); in test_parse_quarters_SMART()
183 LocalDate parsed = LocalDate.parse(date.getYear() + "-" + qoy + "-" + doq, f); in test_parse_quarters_LENIENT()
453 {IsoFields.WEEK_BASED_YEAR, 2016, ValueRange.of(LocalDate.MIN.getYear(), in data_isofields()
454 LocalDate.MAX.getYear())}, in data_isofields()
491 while (date.getYear() < 2400) { in test_loop()
493 if (date.getYear() != year) { in test_loop()
494 year = date.getYear(); in test_loop()
DTCKWeekFields.java392 String str = date.getYear() + ":" + date.getMonthValue() + ":" + in test_parse_resolve_localizedWom()
416 String str = date.getYear() + ":" + date.getMonthValue() + ":" + j + ":" + dow; in test_parse_resolve_localizedWom_lenient()
437 assertEquals(date.getYear(), 2012); in test_parse_resolve_localizedWom_strict()
460 String str = date.getYear() + ":" + date.getMonthValue() + ":" + in test_parse_resolve_localizedWomDow()
485 String str = date.getYear() + ":" + date.getMonthValue() + ":" + j + ":" + dow; in test_parse_resolve_localizedWomDow_lenient()
506 String str = date.getYear() + ":" + in test_parse_resolve_localizedWoy()
529 String str = date.getYear() + ":" + j + ":" + dow; in test_parse_resolve_localizedWoy_lenient()
549 assertEquals(date.getYear(), 2012); in test_parse_resolve_localizedWoy_strict()
571 String str = date.getYear() + ":" + date.getMonthValue() + ":" + in test_parse_resolve_localizedWoyDow()
595 String str = date.getYear() + ":" + j + ":" + dow; in test_parse_resolve_localizedWoyDow_lenient()
/libcore/luni/src/test/java/libcore/java/text/
DOldDateFormatTest.java234 assertEquals(current.getYear(), date.getYear()); in test_parseLString()
267 assertEquals(current.getYear(), date.getYear()); in test_parseLString()
295 assertEquals(current.getYear(), date.getYear()); in test_parseLString()
309 assertEquals(current.getYear(), date.getYear()); in test_parseLString()
322 assertEquals(70, date.getYear()); in test_parseLString()
342 assertEquals(current.getYear(), date.getYear()); in test_parseLString()
397 assertEquals("Years are different.", current.getYear(), result.getYear()); in test_parseObjectLjava_lang_StringLjava_text_ParsePosition()
427 assertEquals("Years are different.", current.getYear(), result.getYear()); in test_parseObjectLjava_lang_StringLjava_text_ParsePosition()
/libcore/ojluni/src/main/java/java/util/
DJapaneseImperialCalendar.java270 date.setDate(transitionDate.getYear(), BaseCalendar.JANUARY, 1); in transitionDate.getYear()
275 date.setDate(transitionDate.getYear(), BaseCalendar.DECEMBER, 31); in transitionDate.getYear()
281 int y = lgd.getYear();
426 set(YEAR, d.getYear()); in add()
434 set(YEAR, d.getYear()); in add()
646 int year = jdate.getYear(); in roll()
714 if (jdate.getYear() == 1) { in roll()
720 if (transition.getYear() == jdate.getNormalizedYear()) { in roll()
762 int year = jdate.getYear(); in roll()
807 if (!(d.getEra() == jdate.getEra() && d.getYear() == jdate.getYear())) { in roll()
[all …]
DDate.java613 defaultCenturyStart = gcal.getCalendarDate().getYear() - 80; in parse()
671 public int getYear() { in getYear() method in Date
672 return normalize().getYear() - 1900; in getYear()
1072 sb.append(' ').append(date.getYear()); // yyyy in toString()
1150 sb.append(date.getYear()).append(' '); // yyyy in toGMTString()
/libcore/luni/src/main/java/javax/xml/datatype/
DXMLGregorianCalendar.java479 public abstract int getYear(); in getYear() method in XMLGregorianCalendar
692 return gc.getYear() in hashCode()
/libcore/ojluni/src/test/java/time/test/java/time/
DTestOffsetDateTime_instants.java101 assertEquals(test.getYear(), 1970); in factory_ofInstant_allSecsInDay()
159 assertEquals(test.getYear(), Year.MIN_VALUE); in factory_ofInstant_minWithMinOffset()
175 assertEquals(test.getYear(), Year.MIN_VALUE); in factory_ofInstant_minWithMaxOffset()
191 assertEquals(test.getYear(), Year.MAX_VALUE); in factory_ofInstant_maxWithMinOffset()
207 assertEquals(test.getYear(), Year.MAX_VALUE); in factory_ofInstant_maxWithMaxOffset()
DTestLocalDate.java99 if (newDayOfMonth <= date.getMonth().length(isIsoLeap(date.getYear()))) { in next()
104 date = date.withYear(date.getYear() + 1); in next()
116 date = date.withYear(date.getYear() - 1); in previous()
118 return date.withDayOfMonth(date.getMonth().length(isIsoLeap(date.getYear()))); in previous()
/libcore/ojluni/src/test/java/util/zip/
DTestLocalTime.java134 if (ldt.getYear() < 1980 || ldt.getYear() > (1980 + 0x7f)) { in check()
/libcore/luni/src/test/java/tests/security/cert/
DCertificateRevocationExceptionTest.java119 firstDate.setYear(firstDate.getYear() + 1);
129 firstDate.setYear(firstDate.getYear() + 1);
/libcore/ojluni/src/main/java/java/time/chrono/
DJapaneseChronology.java357 int gregorianYear = jera.getPrivateEra().getSinceDate().getYear() + yearOfEra - 1; in prolepticYear()
410 int startYear = getCurrentEra().getPrivateEra().getSinceDate().getYear(); in range()
423 return ValueRange.of(JapaneseDate.MEIJI_6_ISODATE.getYear(), Year.MAX_VALUE); in range()
469 return era.getPrivateEra().getSinceDate().getYear() + yearOfEra - 1; in prolepticYearLenient()
DJapaneseDate.java289 if (era.getPrivateEra() != jdate.getEra() || yearOfEra != jdate.getYear()) { in ofYearDay()
330 this.yearOfEra = jdate.getYear(); in JapaneseDate()
501 int year = isoDate.getYear(); in toPrivateJapaneseDate()
503 year -= sunEra.getSinceDate().getYear() - 1; in toPrivateJapaneseDate()
/libcore/luni/src/test/java/libcore/javax/xml/datatype/
DXMLGregorianCalendarTest.java244 public int getYear() { in getYear() method in XMLGregorianCalendarTest.XMLGregorianCalendarImpl
290 if (year != rhs.getYear()) return Integer.signum(year - rhs.getYear()); in compare()
/libcore/ojluni/src/main/java/java/sql/
DTime.java157 public int getYear() { in getYear() method in Time
DDate.java157 int year = super.getYear() + 1900; in toString()
/libcore/ojluni/src/main/java/java/time/
DYearMonth.java195 return YearMonth.of(now.getYear(), now.getMonth()); in now()
419 … return (getYear() <= 0 ? ValueRange.of(1, Year.MAX_VALUE + 1) : ValueRange.of(1, Year.MAX_VALUE)); in range()
508 public int getYear() { in getYear() method in YearMonth
/libcore/ojluni/src/main/java/java/util/zip/
DZipUtils.java135 int year = ldt.getYear() - 1980; in javaToDosTime()
153 if (ldt.getYear() >= 1980) { in javaToExtendedDosTime()
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKLocalizedPrinterParser.java148 … Date oldDate = new Date(date.getYear() - 1900, date.getMonthValue() - 1, date.getDayOfMonth()); in test_date_print()
160 … Date oldDate = new Date(date.getYear() - 1900, date.getMonthValue() - 1, date.getDayOfMonth()); in test_date_parse()
/libcore/luni/src/test/java/libcore/java/time/chrono/
DIsoChronologyTest.java59 assertEquals(values[0], localDate.getYear()); in test_dateYear()

123