Lines Matching refs:year

95  * Determine whether the given gregorian year is a Leap year 
97 static UBool isGregorianLeap(int32_t year)
99 return ((year % 4) == 0) && (!(((year % 100) == 0) && ((year % 400) != 0)));
109 * @param eyear The year in Saka Era
129 * Return the number of days in the given Indian year
131 * @param eyear The year in Saka Era.
139 * @param year The Gregorian year
143 static double gregorianToJD(int32_t year, int32_t month, int32_t date) {
145 (365 * (year - 1)) +
146 uprv_floor((year - 1) / 4) +
147 (-uprv_floor((year - 1) / 100)) +
148 uprv_floor((year - 1) / 400) +
151 (isGregorianLeap(year) ? -1 : -2)
164 int32_t year, month, day;
174 year = (int32_t)((quadricent * 400) + (cent * 100) + (quad * 4) + yindex);
176 year++;
178 yearday = wjd - gregorianToJD(year, 1, 1);
179 leapadj = ((wjd < gregorianToJD(year, 3, 1)) ? 0
181 (isGregorianLeap(year) ? 1 : 2)
184 day = (int32_t)(wjd - gregorianToJD(year, month, 1)) + 1;
186 gregorianDate[0] = year;
197 static double IndianToJD(int32_t year, int32_t month, int32_t date) {
201 gyear = year + INDIAN_ERA_START;
237 * Return JD of start of given month/year of Indian Calendar
238 * @param eyear The year in Indian Calendar measured from Saka Era (78 AD).
267 int32_t year;
270 year = internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1
272 year = internalGet(UCAL_YEAR, 1); // Default to year 1
275 return year;
300 jdAtStartOfGregYear = gregorianToJD(gregorianYear, 1, 1); // JD at start of Gregorian year
301 yday = (int32_t)(julianDay - jdAtStartOfGregYear); // Day number in Gregorian year (starting from 0)
304 // Day is at the end of the preceding Saka year
306 leapMonth = isGregorianLeap(gregorianYear - 1) ? 31 : 30; // Days in leapMonth this year, previous Gregorian year
309 leapMonth = isGregorianLeap(gregorianYear) ? 31 : 30; // Days in leapMonth this year