Searched refs:year (Results 1 - 17 of 17) sorted by relevance

/libcore/luni/src/main/java/java/util/
H A DGrego.java56 * Return true if the given year is a leap year.
57 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
58 * @return true if the year is a leap year
60 public static final boolean isLeapYear(int year) { argument
61 // year&0x3 == year%4
62 return ((year
71 monthLength(int year, int month) argument
81 previousMonthLength(int year, int month) argument
93 fieldsToDay(int year, int month, int dom) argument
203 getDayOfWeekInMonth(int year, int month, int dayOfMonth) argument
[all...]
H A DGregorianCalendar.java42 * the Julian calendar is the leap year rule. The Julian calendar specifies leap
54 * date, leap year rules were applied irregularly, and before 45 BC the Julian
65 * 53. Week 1 for a year is the earliest seven day period starting on
67 * {@code getMinimalDaysInFirstWeek()} days from that year. It thus
70 * Weeks between week 1 of one year and week 1 of the following year are
89 * {@code getFirstDayOfWeek()}. Unlike week 1 of a year, week 1 of a
238 * @param year
239 * the year.
245 public GregorianCalendar(int year, in argument
265 GregorianCalendar(int year, int month, int day, int hour, int minute) argument
287 GregorianCalendar(int year, int month, int day, int hour, int minute, int second) argument
808 daysFromBaseYear(long year) argument
842 daysInYear(int year) argument
1067 isLeapYear(int year) argument
[all...]
H A DDate.java65 * @param year
66 * the year, 0 is 1900.
75 public Date(int year, int month, int day) { argument
77 cal.set(1900 + year, month, day);
85 * @param year
86 * the year, 0 is 1900.
99 public Date(int year, int month, int day, int hour, int minute) { argument
101 cal.set(1900 + year, month, day, hour, minute);
109 * @param year
110 * the year,
126 Date(int year, int month, int day, int hour, int minute, int second) argument
658 setYear(int year) argument
755 UTC(int year, int month, int day, int hour, int minute, int second) argument
[all...]
H A DSimpleTimeZone.java342 public int getOffset(int era, int year, int month, int day, int dayOfWeek, int time) { argument
347 if (month != Calendar.FEBRUARY || day != 29 || !isLeapYear(year)) {
351 if (!useDaylightTime() || era != GregorianCalendar.AD || year < startYear) {
377 year)) {
419 if (endMonth == Calendar.FEBRUARY && isLeapYear(year)) {
454 if (ruleMonth == Calendar.FEBRUARY && isLeapYear(year)) {
530 private boolean isLeapYear(int year) { argument
531 if (year > 1582) {
532 return year % 4 == 0 && (year
787 setStartYear(int year) argument
[all...]
H A DCalendar.java57 * fields, as well as their meaning. For example, the first month of the year
84 * the first week of the month or year as a reference point. The first week of a
85 * month or year is defined as the earliest seven day period beginning on
87 * {@code getMinimalDaysInFirstWeek()} days of that month or year. Weeks
91 * designate the week before week 1 of a year as week <em>n</em> of the
92 * previous year.
97 * {@code Date} (such as only year and month but no day in the month), or
220 * gives September of the next year. Since {@code DAY_OF_MONTH} cannot be
265 * increment and decrement buttons for the month, day, and year, and an
348 * year
1129 set(int year, int month, int day) argument
1140 set(int year, int month, int day, int hourOfDay, int minute) argument
1151 set(int year, int month, int day, int hourOfDay, int minute, int second) argument
[all...]
H A DTimeZone.java298 public abstract int getOffset(int era, int year, int month, int day, argument
449 * savings before but plans to start next year would return true.
/libcore/luni/src/main/java/libcore/util/
H A DZoneInfo.java176 public int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis) { argument
181 long calc = (year / 400) * MILLISECONDS_PER_400_YEARS;
182 year %= 400;
184 calc += year * (365 * MILLISECONDS_PER_DAY);
185 calc += ((year + 3) / 4) * MILLISECONDS_PER_DAY;
187 if (year > 0) {
188 calc -= ((year - 1) / 100) * MILLISECONDS_PER_DAY;
191 boolean isLeap = (year == 0 || (year % 4 == 0 && year
[all...]
/libcore/luni/src/main/java/javax/xml/datatype/
H A DDatatypeFactory.java148 * Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively.
150 * year, month, day, hour, minute, and second.
177 * Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively.
179 * year, month, day, hour, minute, and second.
525 * whose lexical representation contains only year and month components.
564 * whose lexical representation contains only year and month components.
586 * <p>Any remaining milliseconds after determining the year and month are discarded.</p>
599 * <code>year</code> and <code>month</code> as defined in
612 * @param year Year of <code>Duration</code>.
615 * @return New <code>Duration</code> created using the specified <code>year</cod
620 newDurationYearMonth( final boolean isPositive, final BigInteger year, final BigInteger month) argument
653 newDurationYearMonth( final boolean isPositive, final int year, final int month) argument
788 newXMLGregorianCalendar( final BigInteger year, final int month, final int day, final int hour, final int minute, final int second, final BigDecimal fractionalSecond, final int timezone) argument
824 newXMLGregorianCalendar( final int year, final int month, final int day, final int hour, final int minute, final int second, final int millisecond, final int timezone) argument
886 newXMLGregorianCalendarDate( final int year, final int month, final int day, final int timezone) argument
[all...]
H A DXMLGregorianCalendar.java66 * <a name="datetimefield-year"/>
68 * <td> year </td>
74 * {@link #getEon()} is high order year value in billion of years.<br/>
77 * Given that <a href="http://www.w3.org/2001/05/xmlschema-errata#e2-63">XML Schema 1.0 errata</a> states that the year zero
79 * this class allows the year field to be set to zero. Otherwise,
80 * the year field value is handled exactly as described
82 * validation does not allow for the year field to have a value of zero.
196 * BigInteger year,
205 * int year,
215 * int year,
254 setYear(BigInteger year) argument
269 setYear(int year) argument
[all...]
/libcore/luni/src/main/java/java/sql/
H A DDate.java24 * format only deals with year, month and day values. There are no values for
41 * Constructs a {@code Date} object corresponding to the supplied year,
46 * the year, specified as the year minus 1900. Must be in the
229 int year = Integer.parseInt(dateString.substring(0, firstIndex));
234 return new Date(year - 1900, month - 1, day);
/libcore/luni/src/test/java/libcore/java/util/
H A DCalendarTest.java146 private void testSetSelfConsistent(TimeZone timeZone, int year, int month, int day) { argument
151 calendar.set(year, month, day, hour, minute);
152 assertEquals(year, calendar.get(Calendar.YEAR));
196 int year, int month, int day, int hour, int minute) {
197 assertEquals(year, calendar.get(Calendar.YEAR));
195 assertCalendarEquals(Calendar calendar, int year, int month, int day, int hour, int minute) argument
H A DOldTimeZoneTest.java30 public int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds) { argument
/libcore/luni/src/main/java/java/text/
H A DSimpleDateFormat.java69 * <tr> <td>{@code D}</td> <td>day in year</td> <td>(Number)</td> <td>189</td> </tr>
76 * <tr> <td>{@code M}</td> <td>month in year</td> <td>(Text)</td> <td>{@code M}:1 {@code MM}:01 {@code MMM}:Jan {@code MMMM}:January {@code MMMMM}:J</td> </tr>
87 * <tr> <td>{@code w}</td> <td>week in year</td> <td>(Number)</td> <td>27</td> </tr>
88 * <tr> <td>{@code y}</td> <td>year</td> <td>(Number)</td> <td>{@code yy}:10 {@code y}/{@code yyy}/{@code yyyy}:2010</td> </tr>
419 * properties, pattern, {@code DateFormatSymbols} and creation year.
583 int year = calendar.get(Calendar.YEAR);
590 appendNumber(buffer, 2, year % 100);
592 appendNumber(buffer, count, year);
822 * Returns the date which is the start of the one hundred year period for two-digit year value
[all...]
/libcore/luni/src/main/java/java/util/zip/
H A DZipEntry.java276 int year = cal.get(Calendar.YEAR);
277 if (year < 1980) {
/libcore/luni/src/test/java/tests/api/java/util/
H A DCalendarTest.java467 int year = Integer.MIN_VALUE + 71;
469 cal.set(Calendar.YEAR, year + 1900);
552 // test by year
/libcore/crypto/src/main/native/
H A Dorg_conscrypt_NativeCrypto.cpp4686 int sec, min, hour, mday, mon, year; local
4695 get_ASN1_TIME_data(&p, &year, 4);
4697 env->CallVoidMethod(calendar, calendar_setMethod, year, mon - 1, mday, hour, min, sec);
/libcore/benchmarks/libs/
H A Dcaliper.jarMETA-INF/ META-INF/MANIFEST.MF com/ com/google/ com/google/caliper/ com/google/caliper/AllocationMeasurer ...

Completed in 1808 milliseconds