Lines Matching refs:year

432             int realYear = iterator.year;
441 + "/" + iterator.year + " day=" + day);
448 realYear = t.year;
454 + "/" + t.year);
471 + "/" + t.year
670 // them to year/month/day values in the local timezone.
685 // them to year/month/day values in the local timezone.
698 // for fast comparisons and that is easy to generate from year/month/day
847 // We need the "until" year/month/day values to be in the same
879 int iteratorYear = iterator.year;
886 // year is never expanded -- there is no BYYEAR
889 if (SPEW) Log.i(TAG, "year=" + generated.year);
902 // Keep the year and month that days is for, and generate it
1090 iterator.year += value;
1144 int year = date.year;
1157 // from the year and adding a year's worth of days to "monthDay" in
1160 // If month is after Feb, then add this year's length so that we
1161 // include this year's leap day, if any.
1162 // Otherwise (the month is Feb or earlier), add last year's length.
1163 // Subtract one from the year in either case. This gives the same
1167 int days = month > 1 ? yearLength(year) : yearLength(year - 1);
1169 year -= 1;
1174 year += years;
1178 year += years;
1184 // On January, check if we can jump forward a whole year.
1186 int yearLength = yearLength(year);
1188 year++;
1192 int monthLength = monthLength(year, month);
1198 year++;
1210 date.year = year;
1211 date.weekDay = weekDay(year, month, monthDay);
1212 date.yearDay = yearDay(year, month, monthDay);
1216 * Returns true if the given year is a leap year.
1218 * @param year the given year to test
1219 * @return true if the given year is a leap year.
1221 static boolean isLeapYear(int year) {
1222 return (year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0));
1226 * Returns the number of days in the given year.
1228 * @param year the given year
1229 * @return the number of days in the given year.
1231 static int yearLength(int year) {
1232 return isLeapYear(year) ? 366 : 365;
1241 * Returns the number of days in the given month of the given year.
1243 * @param year the given year.
1245 * @return the number of days in the given month of the given year.
1247 static int monthLength(int year, int month) {
1252 return isLeapYear(year) ? 29 : 28;
1257 * the given year, month, and day.
1259 * @param year the year
1264 static int weekDay(int year, int month, int day) {
1267 year -= 1;
1269 return (day + (13 * month - 14) / 5 + year + year/4 - year/100 + year/400) % 7;
1273 * Computes the 0-based "year day", given the year, month, and day.
1275 * @param year the year
1278 * @return the 0-based "year day", the number of days into the year
1280 static int yearDay(int year, int month, int day) {
1282 if (month >= 2 && isLeapYear(year)) {
1301 // 37 bits for the year, 4 bits for the month, 5 bits for the monthDay,
1303 return ((long)normalized.year << 26) + (normalized.month << 22)
1309 date.year = (int) (val >> 26);