Lines Matching defs:year

64     // The base Gregorian year of FIXED_DATES[]
162 // Cache for the fixed date of January 1 and year length of the
169 protected final boolean hit(int year) {
170 return year == cachedYear;
185 protected void setCache(int year, long jan1, int len) {
186 cachedYear = year;
275 int year = bdate.getNormalizedYear();
279 year -= (int)((xm / 12) + 1);
281 bdate.setNormalizedYear(year);
284 year += (int)((month - 1) / 12);
286 bdate.setNormalizedYear(year);
292 * Returns 366 if the specified date is in a leap year, or 365
299 * @return a year length in days
331 // accepts 0 (December in the previous year) to 12.
332 private final int getMonthLength(int year, int month) {
334 if (month == FEBRUARY && isLeapYear(year)) {
346 final long getDayOfYear(int year, int month, int dayOfMonth) {
348 + (isLeapYear(year) ?
364 public long getFixedDate(int year, int month, int dayOfMonth, BaseCalendar.Date cache) {
367 // Look up the one year cache
368 if (cache != null && cache.hit(year)) {
372 return cache.getCachedJan1() + getDayOfYear(year, month, dayOfMonth) - 1;
376 int n = year - BASE_YEAR;
380 cache.setCache(year, jan1, isLeapYear(year) ? 366 : 365);
382 return isJan1 ? jan1 : jan1 + getDayOfYear(year, month, dayOfMonth) - 1;
385 long prevyear = (long)year - 1;
403 days -= isLeapYear(year) ? 1 : 2;
408 cache.setCache(year, days, isLeapYear(year) ? 366 : 365);
422 int year;
426 year = gdate.getCachedYear();
428 isLeap = isLeapYear(year);
431 // much. So we calculate year and jan1. getFixedDate()
433 year = getGregorianYearFromFixedDate(fixedDate);
434 jan1 = getFixedDate(year, JANUARY, 1, null);
435 isLeap = isLeapYear(year);
437 gdate.setCache (year, jan1, isLeap ? 366 : 365);
461 gdate.setNormalizedYear(year);
490 * Returns the Gregorian year number of the given fixed date.
496 int year;
519 year = 400 * n400 + 100 * n100 + 4 * n4 + n1;
521 ++year;
523 return year;
527 * @return true if the specified year is a Gregorian leap year, or