Home
last modified time | relevance | path

Searched refs:day (Results 1 – 25 of 35) sorted by relevance

12

/libcore/ojluni/src/main/java/java/time/
DMonthDay.java145 private final int day; field in MonthDay
315 this.day = dayOfMonth; in MonthDay()
442 case DAY_OF_MONTH: return day; in getLong()
488 return day; in getDayOfMonth()
503 return (day == 29 && month == 2 && Year.isLeap(year) == false) == false; in isValidYear()
541 int day = Math.min(this.day, month.maxLength()); in with() local
542 return new MonthDay(month.getValue(), day); in with()
559 if (dayOfMonth == this.day) { in withDayOfMonth()
626 … return temporal.with(DAY_OF_MONTH, Math.min(temporal.range(DAY_OF_MONTH).getMaximum(), day)); in adjustInto()
659 return LocalDate.of(year, month, isValidYear(year) ? day : 28); in atYear()
[all …]
DLocalDate.java171 private final short day; field in LocalDate
440 private static LocalDate resolvePreviousValid(int year, int month, int day) { in resolvePreviousValid() argument
443 day = Math.min(day, IsoChronology.INSTANCE.isLeapYear(year) ? 29 : 28); in resolvePreviousValid()
449 day = Math.min(day, 30); in resolvePreviousValid()
452 return new LocalDate(year, month, day); in resolvePreviousValid()
465 this.day = (short) dayOfMonth; in LocalDate()
661 case ALIGNED_DAY_OF_WEEK_IN_MONTH: return ((day - 1) % 7) + 1; in get0()
663 case DAY_OF_MONTH: return day; in get0()
666 case ALIGNED_WEEK_OF_MONTH: return ((day - 1) / 7) + 1; in get0()
771 return day; in getDayOfMonth()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKWeekFields.java152 LocalDate day = LocalDate.of(2000, 1, 10); // Known to be ISO Monday in test_dayOfWeekField() local
157 … assertEquals(day.get(f), (7 + day.getDayOfWeek().getValue() - firstDayOfWeek.getValue()) % 7 + 1); in test_dayOfWeekField()
158 day = day.plusDays(1); in test_dayOfWeekField()
164 LocalDate day = LocalDate.of(2012, 12, 31); // Known to be ISO Monday in test_weekOfMonthField() local
170 int actualDOW = day.get(dowField); in test_weekOfMonthField()
171 int actualWOM = day.get(womField); in test_weekOfMonthField()
175 LocalDate day1 = day.withDayOfMonth(1); in test_weekOfMonthField()
188 assertEquals(result, day, "Incorrect dayOfWeek or weekOfMonth: " in test_weekOfMonthField()
190 week, day.getDayOfWeek(), offset, actualDOW, actualWOM, day, result)); in test_weekOfMonthField()
191 day = day.plusDays(1); in test_weekOfMonthField()
[all …]
DTCKTemporalAdjusters.java340 for (int day = 1; day <= Month.of(month).length(false); day++) { in test_dayOfWeekInMonth_positive()
341 LocalDate date = date(year, month, day); in test_dayOfWeekInMonth_positive()
368 for (int day = 1; day <= Month.of(month).length(false); day++) { in test_dayOfWeekInMonth_zero()
369 LocalDate date = date(year, month, day); in test_dayOfWeekInMonth_zero()
396 for (int day = 1; day <= Month.of(month).length(false); day++) { in test_dayOfWeekInMonth_negative()
397 LocalDate date = date(year, month, day); in test_dayOfWeekInMonth_negative()
419 for (int day = 1; day <= Month.of(month).length(false); day++) { in test_firstInMonth()
420 LocalDate date = date(year, month, day); in test_firstInMonth()
422 assertEquals(test, expected, "day-of-month=" + day); in test_firstInMonth()
441 for (int day = 1; day <= Month.of(month).length(false); day++) { in test_lastInMonth()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DCopticDate.java112 private final short day; field in CopticDate
132 private static CopticDate resolvePreviousValid(int prolepticYear, int month, int day) { in resolvePreviousValid() argument
133 if (month == 13 && day > 5) { in resolvePreviousValid()
134 day = CopticChronology.INSTANCE.isLeapYear(prolepticYear) ? 6 : 5; in resolvePreviousValid()
136 return new CopticDate(prolepticYear, month, day); in resolvePreviousValid()
160 this.day = (short) dayOfMonth; in CopticDate()
215 case ALIGNED_DAY_OF_WEEK_IN_MONTH: return ((day - 1) % 7) + 1; in getLong()
217 case DAY_OF_MONTH: return day; in getLong()
218 case DAY_OF_YEAR: return (month - 1) * 30 + day; in getLong()
220 case ALIGNED_WEEK_OF_MONTH: return ((day - 1) / 7) + 1; in getLong()
[all …]
/libcore/ojluni/src/main/java/java/sql/
DDate.java57 public Date(int year, int month, int day) { in Date() argument
58 super(year, month, day); in Date()
135 int day = Integer.parseInt(dd); in valueOf() local
137 if ((month >= 1 && month <= MAX_MONTH) && (day >= 1 && day <= MAX_DAY)) { in valueOf()
138 d = new Date(year - 1900, month - 1, day); in valueOf()
159 int day = super.getDate(); in toString() local
168 buf[8] = Character.forDigit(day/10,10); in toString()
169 buf[9] = Character.forDigit(day%10,10); in toString()
DTimestamp.java177 int day = 0; in valueOf() local
227 day = Integer.parseInt(dd); in valueOf()
229 if ((month >= 1 && month <= MAX_MONTH) && (day >= 1 && day <= MAX_DAY)) { in valueOf()
263 return new Timestamp(year - 1900, month - 1, day, hour, minute, second, a_nanos); in valueOf()
278 int day = super.getDate(); in toString() local
306 if (day < 10) { in toString()
307 dayString = "0" + day; in toString()
309 dayString = Integer.toString(day); in toString()
/libcore/luni/src/main/java/javax/xml/datatype/
DDatatypeFactory.java468 final BigInteger day, in newDurationDayTime() argument
477 day, in newDurationDayTime()
510 final int day, in newDurationDayTime() argument
516 day, hour, minute, second); in newDurationDayTime()
791 final int day, in newXMLGregorianCalendar() argument
827 final int day, in newXMLGregorianCalendar() argument
854 day, in newXMLGregorianCalendar()
889 final int day, in newXMLGregorianCalendarDate() argument
895 day, in newXMLGregorianCalendarDate()
DXMLGregorianCalendar.java295 public abstract void setDay(int day); in setDay() argument
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKDateTimeFormatters.java227 Integer year, Integer month, Integer day, String offsetId, String zoneId, in test_print_isoLocalDate() argument
229 … TemporalAccessor test = buildAccessor(year, month, day, null, null, null, null, offsetId, zoneId); in test_print_isoLocalDate()
244 Integer year, Integer month, Integer day, String offsetId, String zoneId, in test_parse_isoLocalDate() argument
247 Expected expected = createDate(year, month, day); in test_parse_isoLocalDate()
321 Integer year, Integer month, Integer day, String offsetId, String zoneId, in test_print_isoOffsetDate() argument
323 … TemporalAccessor test = buildAccessor(year, month, day, null, null, null, null, offsetId, zoneId); in test_print_isoOffsetDate()
338 Integer year, Integer month, Integer day, String offsetId, String zoneId, in test_parse_isoOffsetDate() argument
341 Expected expected = createDate(year, month, day); in test_parse_isoOffsetDate()
379 Integer year, Integer month, Integer day, String offsetId, String zoneId, in test_print_isoDate() argument
381 … TemporalAccessor test = buildAccessor(year, month, day, null, null, null, null, offsetId, zoneId); in test_print_isoDate()
[all …]
DTCKResolverStyle.java110 …resolverStyle(String str, ResolverStyle style, Class<?> expectedEx, int year, int month, int day) { in test_resolverStyle() argument
129 assertEquals(accessor.get(ChronoField.DAY_OF_MONTH), day); in test_resolverStyle() local
/libcore/ojluni/src/main/java/sun/security/util/
DDerInputBuffer.java313 int year, month, day, hour, minute, second, millis; in getTime() local
337 day = 10 * Character.digit((char)buf[pos++], 10); in getTime()
338 day += Character.digit((char)buf[pos++], 10); in getTime()
394 if (month == 0 || day == 0 in getTime()
395 || month > 12 || day > 31 in getTime()
405 date.setDate(year, month, day); in getTime()
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestExampleCode.java90 int day = now1.get(ChronoField.DAY_OF_MONTH); in test_chronoPackageExample() local
95 dow, day, month, year); in test_chronoPackageExample()
150 int day = now1.get(ChronoField.DAY_OF_MONTH); in test_calendarPackageExample() local
155 dow, day, month, year); in test_calendarPackageExample()
DTestUmmAlQuraChronology.java136 ValueRange day = chrono.range(DAY_OF_MONTH); in Test_UmmAlQuraChronoRange() local
137 assertEquals(day.getMinimum(), 1, "Minimum day"); in Test_UmmAlQuraChronoRange()
138 assertEquals(day.getLargestMinimum(), 1, "Largest minimum day"); in Test_UmmAlQuraChronoRange()
139 assertEquals(day.getMaximum(), 30, "Largest day"); in Test_UmmAlQuraChronoRange()
140 assertEquals(day.getSmallestMaximum(), 29, "Smallest Maximum day"); in Test_UmmAlQuraChronoRange()
442 public void test_ofPattern(int year, int month, int day, String expected) { in test_ofPattern() argument
444 assertEquals(test.format(HijrahDate.of(year, month, day)), expected); in test_ofPattern()
459 public void test_formatterOfLocalizedDate(int year, int month, int day, String expected) { in test_formatterOfLocalizedDate() argument
460 HijrahDate hd = HijrahChronology.INSTANCE.date(year, month, day); in test_formatterOfLocalizedDate()
/libcore/luni/src/test/java/libcore/java/util/
DCalendarTest.java150 private void testSetSelfConsistent(TimeZone timeZone, int year, int month, int day) { in testSetSelfConsistent() argument
155 calendar.set(year, month, day, hour, minute); in testSetSelfConsistent()
158 assertEquals(day, calendar.get(Calendar.DAY_OF_MONTH)); in testSetSelfConsistent()
214 int year, int month, int day, int hour, int minute) { in assertCalendarEquals() argument
217 assertEquals("day", day, calendar.get(Calendar.DATE)); in assertCalendarEquals()
DOldTimeZoneTest.java29 … public int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds) { in getOffset() argument
/libcore/luni/src/main/java/libcore/util/
DZoneInfo.java102 public int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis) { in getOffset() argument
103 return mDelegate.getOffset(era, year, month, day, dayOfWeek, millis); in getOffset()
/libcore/ojluni/src/main/java/java/time/chrono/
DHijrahDate.java414 private HijrahDate resolvePreviousValid(int prolepticYear, int month, int day) { in resolvePreviousValid() argument
416 if (day > monthDays) { in resolvePreviousValid()
417 day = monthDays; in resolvePreviousValid()
419 return HijrahDate.of(chrono, prolepticYear, month, day); in resolvePreviousValid()
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestReducedPrinter.java269 public void test_printAdjacent(String pattern, String text, int year, int month, int day) { in test_printAdjacent() argument
274 LocalDate ld = LocalDate.of(year, month, day); in test_printAdjacent()
/libcore/ojluni/src/main/java/sun/util/calendar/
DLocalGregorianCalendar.java312 int day = ldate.getDayOfMonth(); in normalize() local
314 if (day > sinceDay) { in normalize()
317 if (day == sinceDay) { in normalize()
/libcore/ojluni/src/main/java/java/util/
DSimpleTimeZone.java604 public int getOffset(int era, int year, int month, int day, int dayOfWeek, in getOffset() argument
637 cdate.setDate(y, m, day); in getOffset()
650 cdate.setNormalizedDate(y, m, day); in getOffset()
656 || (cdate.getDayOfMonth() != day) in getOffset()
/libcore/ojluni/src/main/java/java/time/temporal/
DWeekFields.java869 private int startOfWeekOffset(int day, int dow) { in startOfWeekOffset() argument
871 int weekStart = Math.floorMod(day - dow, 7); in startOfWeekOffset()
888 private int computeWeek(int offset, int day) { in computeWeek() argument
889 return ((7 + offset + (day - 1)) / 7); in computeWeek()
/libcore/ojluni/src/test/java/time/test/java/time/
DTestZoneId.java650 private Instant createInstant(int year, int month, int day, ZoneOffset offset) { in createInstant() argument
651 return LocalDateTime.of(year, month, day, 0, 0).toInstant(offset); in createInstant()
654 …private Instant createInstant(int year, int month, int day, int hour, int min, int sec, int nano, … in createInstant() argument
655 return LocalDateTime.of(year, month, day, hour, min, sec, nano).toInstant(offset); in createInstant()
658 …private ZonedDateTime createZDT(int year, int month, int day, int hour, int min, int sec, int nano… in createZDT() argument
659 return LocalDateTime.of(year, month, day, hour, min, sec, nano).atZone(zone); in createZDT()
662 private LocalDateTime createLDT(int year, int month, int day) { in createLDT() argument
663 return LocalDateTime.of(year, month, day, 0, 0); in createLDT()
/libcore/ojluni/src/test/java/time/tck/java/time/zone/
DTCKZoneRules.java1087 private Instant createInstant(int year, int month, int day, ZoneOffset offset) { in createInstant() argument
1088 return LocalDateTime.of(year, month, day, 0, 0).toInstant(offset); in createInstant()
1091 …private Instant createInstant(int year, int month, int day, int hour, int min, ZoneOffset offset) { in createInstant() argument
1092 return LocalDateTime.of(year, month, day, hour, min).toInstant(offset); in createInstant()
1095 …private Instant createInstant(int year, int month, int day, int hour, int min, int sec, int nano, … in createInstant() argument
1096 return LocalDateTime.of(year, month, day, hour, min, sec, nano).toInstant(offset); in createInstant()
1099 private ZonedDateTime createZDT(int year, int month, int day, ZoneId zone) { in createZDT() argument
1100 return LocalDateTime.of(year, month, day, 0, 0).atZone(zone); in createZDT()
1103 private LocalDateTime createLDT(int year, int month, int day) { in createLDT() argument
1104 return LocalDateTime.of(year, month, day, 0, 0); in createLDT()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DCalendarTest.java842 for (int day = 1; day <= 7; day++) { in test_getDisplayNameIILjava_util_Locale()
843 cal.set(Calendar.DAY_OF_WEEK, day); in test_getDisplayNameIILjava_util_Locale()
844 value = symbols.getShortWeekdays()[day]; in test_getDisplayNameIILjava_util_Locale()
847 value = symbols.getWeekdays()[day]; in test_getDisplayNameIILjava_util_Locale()

12