Searched defs:cal (Results 1 - 15 of 15) sorted by relevance

/libcore/ojluni/src/test/java/time/test/java/time/chrono/
H A DTestThaiBuddhistChronoImpl.java97 Calendar cal = java.util.Calendar.getInstance(locale);
98 assertEquals(cal.getCalendarType(), "buddhist", "Unexpected calendar type");
102 cal.setTimeZone(TimeZone.getTimeZone("GMT+00"));
103 cal.set(Calendar.YEAR, thaiDate.get(ChronoField.YEAR));
104 cal.set(Calendar.MONTH, thaiDate.get(ChronoField.MONTH_OF_YEAR) - 1);
105 cal.set(Calendar.DAY_OF_MONTH, thaiDate.get(ChronoField.DAY_OF_MONTH));
108 assertEquals(thaiDate.get(ChronoField.DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch in " + thaiDate + "; cal: " + cal);
109 assertEquals(thaiDate.get(ChronoField.MONTH_OF_YEAR), cal
117 calToString(Calendar cal) argument
[all...]
/libcore/ojluni/src/main/java/java/text/
H A DCalendarBuilder.java103 Calendar establish(Calendar cal) { argument
106 if (weekDate && !cal.isWeekDateSupported()) {
114 cal.clear();
120 cal.set(index, field[MAX_FIELD + index]);
129 field[MAX_FIELD + DAY_OF_WEEK] : cal.getFirstDayOfWeek();
130 if (!isValidDayOfWeek(dayOfWeek) && cal.isLenient()) {
143 cal.setWeekDate(field[MAX_FIELD + WEEK_YEAR], weekOfYear, dayOfWeek);
145 return cal;
/libcore/ojluni/src/test/java/time/test/java/util/
H A DTestFormatter.java112 Calendar cal;
114 cal = Calendar.getJapaneseImperialInstance(tz, calLocale);
116 cal = Calendar.getInstance(tz, calLocale);
118 cal.setTimeInMillis(instant.toEpochMilli());
121 testDate(fmtStr, locale, zdt, cal);
124 testTime(fmtStr, locale, zdt, cal);
126 testZoneId(locale, zdt, cal);
127 testInstant(locale, instant, zdt, cal);
182 ChronoZonedDateTime<?> zdt, Calendar cal) {
184 String expected = test(fmtStr, locale, null, cal);
181 testDate(String fmtStr, Locale locale, ChronoZonedDateTime<?> zdt, Calendar cal) argument
193 testTime(String fmtStr, Locale locale, ChronoZonedDateTime<?> zdt, Calendar cal) argument
219 testZoneId(Locale locale, ChronoZonedDateTime<?> zdt, Calendar cal) argument
243 testInstant(Locale locale, Instant instant, ChronoZonedDateTime<?> zdt, Calendar cal) argument
[all...]
/libcore/luni/src/main/java/javax/xml/datatype/
H A DDatatypeFactory.java755 * @param cal <code>java.util.GregorianCalendar</code> used to create <code>XMLGregorianCalendar</code>
759 * @throws NullPointerException If <code>cal</code> is <code>null</code>.
761 public abstract XMLGregorianCalendar newXMLGregorianCalendar(final GregorianCalendar cal); argument
H A DDuration.java333 Calendar cal = (Calendar) startInstant.clone();
334 addTo(cal);
335 return getCalendarTimeInMillis(cal)
371 Calendar cal = new GregorianCalendar();
372 cal.setTime(startInstant);
373 this.addTo(cal);
374 return getCalendarTimeInMillis(cal) - startInstant.getTime();
558 Calendar cal = new GregorianCalendar();
559 cal.setTime(date);
560 this.addTo(cal);
977 getCalendarTimeInMillis(final Calendar cal) argument
[all...]
/libcore/luni/src/test/java/libcore/java/util/
H A DSimpleTimeZoneTest.java210 GregorianCalendar cal = new GregorianCalendar(timeZone, Locale.ENGLISH);
211 cal.setTimeInMillis(startOfYearMillis);
212 int year = cal.get(Calendar.YEAR);
213 while (!timeZone.inDaylightTime(new Date(cal.getTimeInMillis()))) {
215 if (cal.get(Calendar.YEAR) != year) {
219 cal.add(Calendar.HOUR_OF_DAY, 1);
222 cal.add(Calendar.MILLISECOND, -1);
223 assertFalse(timeZone.inDaylightTime(cal.getTime()));
224 cal.add(Calendar.MILLISECOND, 1);
225 long entryPoint = cal
245 formatCalendar(Calendar cal) argument
[all...]
H A DGregorianCalendarTest.java216 GregorianCalendar cal = new GregorianCalendar();
219 cal.setMinimalDaysInFirstWeek(4);
220 cal.setWeekDate(2016, 13, Calendar.TUESDAY);
221 assertEquals(Calendar.TUESDAY, cal.get(Calendar.DAY_OF_WEEK));
222 assertEquals(29, cal.get(Calendar.DAY_OF_MONTH));
225 cal.setMinimalDaysInFirstWeek(1);
226 cal.setWeekDate(2016, 13, Calendar.TUESDAY);
227 assertEquals(Calendar.TUESDAY, cal.get(Calendar.DAY_OF_WEEK));
228 assertEquals(22, cal.get(Calendar.DAY_OF_MONTH));
231 cal
394 checkMillis(Calendar cal, String description, long expectedMillis) argument
398 checkOutsideDst(Calendar cal, String description) argument
403 checkOutsideDst(Calendar cal, String description, int expectedZoneOffset) argument
407 checkInsideDst(Calendar cal, String description) argument
412 checkDstFields(Calendar cal, String description, int expectedZoneOffset, int expectedDstOffset) argument
[all...]
H A DCalendarTest.java51 Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"), Locale.US);
52 assertEquals(0, cal.get(Calendar.ZONE_OFFSET));
54 cal.setTimeZone(tz);
55 assertEquals(25200000, cal.get(Calendar.ZONE_OFFSET));
231 GregorianCalendar cal = new GregorianCalendar(TimeZone.getTimeZone("America/Los_Angeles"));
233 cal.setTimeInMillis(1454506360000L);
234 checkClear(cal, 0, 28800000);
239 GregorianCalendar cal = new GregorianCalendar(TimeZone.getTimeZone("America/Los_Angeles"));
241 cal.setTimeInMillis(1454531560000L);
242 checkClear(cal, 1
245 checkClear(GregorianCalendar cal, int expectedHourOfDay, long expectedMillis) argument
[all...]
/libcore/ojluni/src/main/java/java/sql/
H A DPreparedStatement.java627 * @param cal the <code>Calendar</code> object the driver will use
634 void setDate(int parameterIndex, java.sql.Date x, Calendar cal) argument
649 * @param cal the <code>Calendar</code> object the driver will use
656 void setTime(int parameterIndex, java.sql.Time x, Calendar cal) argument
671 * @param cal the <code>Calendar</code> object the driver will use
678 void setTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal) argument
H A DCallableStatement.java512 * @param cal the <code>Calendar</code> object the driver will use
522 java.sql.Date getDate(int parameterIndex, Calendar cal) argument
537 * @param cal the <code>Calendar</code> object the driver will use
547 java.sql.Time getTime(int parameterIndex, Calendar cal) argument
563 * @param cal the <code>Calendar</code> object the driver will use
573 java.sql.Timestamp getTimestamp(int parameterIndex, Calendar cal) argument
1237 * @param cal the <code>Calendar</code> object the driver will use
1247 void setDate(String parameterName, java.sql.Date x, Calendar cal) argument
1262 * @param cal the <code>Calendar</code> object the driver will use
1272 void setTime(String parameterName, java.sql.Time x, Calendar cal) argument
1297 setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal) argument
1691 getDate(String parameterName, Calendar cal) argument
1717 getTime(String parameterName, Calendar cal) argument
1744 getTimestamp(String parameterName, Calendar cal) argument
[all...]
H A DResultSet.java2627 * @param cal the <code>java.util.Calendar</code> object
2637 java.sql.Date getDate(int columnIndex, Calendar cal) throws SQLException; argument
2648 * @param cal the <code>java.util.Calendar</code> object
2658 java.sql.Date getDate(String columnLabel, Calendar cal) throws SQLException; argument
2669 * @param cal the <code>java.util.Calendar</code> object
2679 java.sql.Time getTime(int columnIndex, Calendar cal) throws SQLException; argument
2690 * @param cal the <code>java.util.Calendar</code> object
2700 java.sql.Time getTime(String columnLabel, Calendar cal) throws SQLException; argument
2711 * @param cal the <code>java.util.Calendar</code> object
2721 java.sql.Timestamp getTimestamp(int columnIndex, Calendar cal) argument
2743 getTimestamp(String columnLabel, Calendar cal) argument
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
H A DSimpleDateFormatTest.java257 Calendar cal = new GregorianCalendar(1999, Calendar.JUNE, 2, 15, 3, 6);
258 assertFormat(format, " G", cal, " AD", DateFormat.ERA_FIELD);
259 assertFormat(format, " GG", cal, " AD", DateFormat.ERA_FIELD);
260 assertFormat(format, " GGG", cal, " AD", DateFormat.ERA_FIELD);
266 assertFormat(format, " y", cal, " 1999", DateFormat.YEAR_FIELD);
267 assertFormat(format, " yy", cal, " 99", DateFormat.YEAR_FIELD);
274 assertFormat(format, " yyy", cal, " 1999", DateFormat.YEAR_FIELD);
275 assertFormat(format, " yyyy", cal, " 1999", DateFormat.YEAR_FIELD);
276 assertFormat(format, " yyyyy", cal, " 01999", DateFormat.YEAR_FIELD);
278 assertFormat(format, " M", cal, "
394 assertFormat(SimpleDateFormat format, String pattern, Calendar cal, String expected, int field) argument
[all...]
/libcore/ojluni/src/main/java/java/util/
H A DSimpleTimeZone.java558 BaseCalendar cal = date >= GregorianCalendar.DEFAULT_GREGORIAN_CUTOVER ?
560 BaseCalendar.Date cdate = (BaseCalendar.Date) cal.newCalendarDate(TimeZone.NO_TIMEZONE);
562 cal.getCalendarDate(date + rawOffset, cdate);
567 offset = getOffset(cal, cdate, year, date);
626 // year numbers would be convenient to use the UNIX cal
635 BaseCalendar cal = gcal;
636 BaseCalendar.Date cdate = (BaseCalendar.Date) cal.newCalendarDate(TimeZone.NO_TIMEZONE);
638 long time = cal.getTime(cdate); // normalize cdate
648 cal = (BaseCalendar) CalendarSystem.forName("julian");
649 cdate = (BaseCalendar.Date) cal
672 getOffset(BaseCalendar cal, BaseCalendar.Date cdate, int year, long time) argument
724 getStart(BaseCalendar cal, BaseCalendar.Date cdate, int year) argument
733 getEnd(BaseCalendar cal, BaseCalendar.Date cdate, int year) argument
745 getTransition(BaseCalendar cal, BaseCalendar.Date cdate, int mode, int year, int month, int dayOfMonth, int dayOfWeek, int timeOfDay) argument
[all...]
H A DGregorianCalendar.java1328 BaseCalendar cal;
1330 cal = getCutoverCalendarSystem();
1332 cal = gcal;
1334 cal = getJulianCalendarSystem();
1338 if (cal.getYearFromFixedDate(day1) != y) {
1344 cal = (fd >= gregorianCutoverDate) ? gcal : getJulianCalendarSystem();
1345 if (cal.getYearFromFixedDate(fd) != y) {
1513 BaseCalendar cal = (fd >= gregorianCutoverDate) ? gcal : getJulianCalendarSystem();
1514 BaseCalendar.Date d = (BaseCalendar.Date) cal.newCalendarDate(TimeZone.NO_TIMEZONE);
1515 cal
3014 getFixedDate(BaseCalendar cal, int year, int fieldMask) argument
[all...]
/libcore/ojluni/src/main/java/javax/sql/
H A DRowSet.java1684 * @param cal the <code>java.util.Calendar</code> object to use for calculating the date
1687 void setDate(int parameterIndex, java.sql.Date x, Calendar cal) argument
1721 * @param cal the <code>Calendar</code> object the driver will use
1730 void setDate(String parameterName, java.sql.Date x, Calendar cal) argument
1741 * @param cal the <code>java.util.Calendar</code> object to use for calculating the time
1744 void setTime(int parameterIndex, java.sql.Time x, Calendar cal) argument
1776 * @param cal the <code>Calendar</code> object the driver will use
1785 void setTime(String parameterName, java.sql.Time x, Calendar cal) argument
1797 * @param cal the <code>java.util.Calendar</code> object to use for calculating the
1801 void setTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal) argument
1825 setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal) argument
[all...]

Completed in 230 milliseconds