Lines Matching refs:month
144 // a month as having 31 days. Since date parsing now uses range checks based
145 // on the table below, we need to change the range for last day of month to
152 { 0, 0, 11, 11}, // MONTH
207 * Return the day # on which the given month starts. Days are counted
211 * @param year The hijri month, 0-based
213 int32_t IslamicCalendar::monthStart(int32_t year, int32_t month) const {
215 return (int32_t)uprv_ceil(29.5*month)
218 return trueMonthStart(12*(year-1) + month);
223 * Find the day number on which a particular month of the true/lunar
226 * @param month The month in question, origin 0 from the Hijri epoch
228 * @return The day number on which the given month starts.
230 int32_t IslamicCalendar::trueMonthStart(int32_t month) const
233 int32_t start = CalendarCache::get(&gMonthCache, month, status);
236 // Make a guess at when the month started, using the average length
238 + uprv_floor(month * CalendarAstronomer::SYNODIC_MONTH) * kOneDay;
247 // The month has already started
257 // Preceding month has not ended yet.
267 CalendarCache::put(&gMonthCache, month, start, status);
316 * Return the length (in days) of the given month.
319 * @param year The hijri month, 0-based
322 int32_t IslamicCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const {
327 length = 29 + (month+1) % 2;
328 if (month == DHU_AL_HIJJAH && civilLeapYear(extendedYear)) {
332 month = 12*(extendedYear-1) + month;
333 length = trueMonthStart(month+1) - trueMonthStart(month) ;
346 int32_t month = 12*(extendedYear-1);
347 return (trueMonthStart(month + 12) - trueMonthStart(month));
355 // Return JD of start of given month/year
359 int32_t IslamicCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool /* useMonth */) const {
360 return monthStart(eyear, month) + 1948439;
386 * <li>MONTH
397 int32_t year, month, dayOfMonth, dayOfYear;
404 month = (int32_t)uprv_ceil((days - 29 - yearStart(year)) / 29.5 );
405 month = month<11?month:11;
406 startDate = monthStart(year, month);
419 // If we're near the end of the month, assume next month and search backwards
426 // If it was after the date in question, back up a month and try again
431 month = months % 12;
434 dayOfMonth = (days - monthStart(year, month)) + 1;
442 internalSet(UCAL_MONTH, month);