Lines Matching refs:month

196     int32_t mask = (int32_t) (0x01 << (11 - m));    // set mask for bit corresponding to month
278 // a month as having 31 days. Since date parsing now uses range checks based
279 // on the table below, we need to change the range for last day of month to
384 * Return the day # on which the given month starts. Days are counted
388 * @param month The hijri month, 0-based (assumed to be in range 0..11)
390 int32_t IslamicCalendar::monthStart(int32_t year, int32_t month) const {
393 return (int32_t)uprv_ceil(29.5*month)
396 return trueMonthStart(12*(year-1) + month);
399 for(int i=0; i< month; i++){
407 * Find the day number on which a particular month of the true/lunar
410 * @param month The month in question, origin 0 from the Hijri epoch
412 * @return The day number on which the given month starts.
414 int32_t IslamicCalendar::trueMonthStart(int32_t month) const
417 int32_t start = CalendarCache::get(&gMonthCache, month, status);
420 // Make a guess at when the month started, using the average length
422 + uprv_floor(month * CalendarAstronomer::SYNODIC_MONTH) * kOneDay;
431 // The month has already started
441 // Preceding month has not ended yet.
452 CalendarCache::put(&gMonthCache, month, start, status);
502 * Return the length (in days) of the given month.
505 * @param year The hijri month, 0-based
508 int32_t IslamicCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const {
514 length = 29 + (month+1) % 2;
515 if (month == DHU_AL_HIJJAH && civilLeapYear(extendedYear)) {
519 month = 12*(extendedYear-1) + month;
520 length = trueMonthStart(month+1) - trueMonthStart(month) ;
522 length = getUmalqura_MonthLength(extendedYear - UMALQURA_YEAR_START, month);
536 int32_t month = 12*(extendedYear-1);
537 return (trueMonthStart(month + 12) - trueMonthStart(month));
551 // Return JD of start of given month/year
554 // If useMonth is true, get the day before the start of the month.
559 int32_t IslamicCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool /* useMonth */) const {
562 if (month > 11) {
563 eyear += (month / 12);
564 month %= 12;
565 } else if (month < 0) {
566 month++;
567 eyear += (month / 12) - 1;
568 month = (month % 12) + 11;
570 return monthStart(eyear, month) + ((cType == TBLA)? ASTRONOMICAL_EPOC: CIVIL_EPOC) - 1;
607 int32_t year, month, dayOfMonth, dayOfYear;
617 month = (int32_t)uprv_ceil((days - 29 - yearStart(year)) / 29.5 );
618 month = month<11?month:11;
619 startDate = monthStart(year, month);
632 // If we're near the end of the month, assume next month and search backwards
639 // If it was after the date in question, back up a month and try again
644 month = ((months % 12) + 12 ) % 12;
651 month = (int32_t)uprv_ceil((days - 29 - yearStart(year)) / 29.5 );
652 month = month<11?month:11;
653 startDate = monthStart(year, month);
675 month = m;
681 dayOfMonth = (days - monthStart(year, month)) + 1;
690 internalSet(UCAL_MONTH, month);