Logo Search packages:      
Sourcecode: icu version File versions  Download package

void PersianCalendar::handleComputeFields ( int32_t  julianDay,
UErrorCode status 
) [protected, virtual]

Override Calendar to compute several fields specific to the Persian calendar system. These are:

  • ERA
  • YEAR
  • MONTH
  • DAY_OF_MONTH
  • DAY_OF_YEAR
  • EXTENDED_YEAR

The DAY_OF_WEEK and DOW_LOCAL fields are already set when this method is called. The getGregorianXxx() methods return Gregorian calendar equivalents for the given Julian day.

For internal use only.

Override Calendar to compute several fields specific to the Persian calendar system. These are:

  • ERA
  • YEAR
  • MONTH
  • DAY_OF_MONTH
  • DAY_OF_YEAR
  • EXTENDED_YEAR

The DAY_OF_WEEK and DOW_LOCAL fields are already set when this method is called. The getGregorianXxx() methods return Gregorian calendar equivalents for the given Julian day.

Reimplemented from Calendar.

Definition at line 354 of file persncal.cpp.

References Calendar::internalSet(), UCAL_DAY_OF_MONTH, UCAL_DAY_OF_YEAR, UCAL_ERA, UCAL_EXTENDED_YEAR, UCAL_MONTH, and UCAL_YEAR.

                                                                                   {
    int jy,jm,jd;        
    julian_to_jalali(julianDay-1947955,&jy,&jm,&jd);
    internalSet(UCAL_ERA, 0);
    internalSet(UCAL_YEAR, jy);
    internalSet(UCAL_EXTENDED_YEAR, jy);
    internalSet(UCAL_MONTH, jm-1);
    internalSet(UCAL_DAY_OF_MONTH, jd);
    internalSet(UCAL_DAY_OF_YEAR, jd + MONTH_COUNT[jm-1][2]);
}    


Generated by  Doxygen 1.6.0   Back to index