Home | History | Annotate | Download | only in i18n

Lines Matching refs:year

93 #define kJan1_1JulianDay  1721426 // January 1, year 1 (Gregorian)
138 * Return TRUE if the given year is a leap year.
139 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
140 * @return TRUE if the year is a leap year
142 static inline UBool isLeapYear(int32_t year);
146 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
150 static inline int8_t monthLength(int32_t year, int32_t month);
154 * @param y the extended year
161 * Convert a year, month, and day-of-month, given in the proleptic
163 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
168 static double fieldsToDay(int32_t year, int32_t month, int32_t dom);
171 * Convert a 1970-epoch day number to proleptic Gregorian year,
174 * @param year output parameter to receive year
178 * @param doy output parameter to receive day-of-year (1-based)
180 static void dayToFields(double day, int32_t& year, int32_t& month,
184 * Convert a 1970-epoch day number to proleptic Gregorian year,
187 * @param year output parameter to receive year
192 static inline void dayToFields(double day, int32_t& year, int32_t& month,
196 * Convert a 1970-epoch milliseconds to proleptic Gregorian year,
197 * month, day-of-month, and day-of-week, day of year and millis-in-day.
199 * @param year output parameter to receive year
203 * @param doy output parameter to receive day-of-year (1-based)
206 static void timeToFields(UDate time, int32_t& year, int32_t& month,
219 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
224 static int32_t dayOfWeekInMonth(int32_t year, int32_t month, int32_t dom);
243 * Calculates the Gregorian day shift value for an extended year.
244 * @param eyear Extended year
258 inline UBool Grego::isLeapYear(int32_t year) {
259 // year&0x3 == year%4
260 return ((year&0x3) == 0) && ((year%100 != 0) || (year%400 == 0));
264 Grego::monthLength(int32_t year, int32_t month) {
265 return MONTH_LENGTH[month + (isLeapYear(year) ? 12 : 0)];
273 inline void Grego::dayToFields(double day, int32_t& year, int32_t& month,
276 dayToFields(day,year,month,dom,dow,doy_unused);