Logo Search packages:      
Sourcecode: icu version File versions

void Grego::timeToFields ( UDate  time,
int32_t &  year,
int32_t &  month,
int32_t &  dom,
int32_t &  dow,
int32_t &  doy,
int32_t &  mid 
) [static]

Convert a 1970-epoch milliseconds to proleptic Gregorian year, month, day-of-month, and day-of-week, day of year and millis-in-day.

time 1970-epoch milliseconds
year output parameter to receive year
month output parameter to receive month (0-based, 0==Jan)
dom output parameter to receive day-of-month (1-based)
dow output parameter to receive day-of-week (1-based, 1==Sun)
doy output parameter to receive day-of-year (1-based)
mid output parameter to recieve millis-in-day

Definition at line 134 of file gregoimp.cpp.

References dayToFields(), ClockMath::floorDivide(), and U_MILLIS_PER_DAY.

Referenced by AnnualTimeZoneRule::getNextStart(), AnnualTimeZoneRule::getPreviousStart(), BasicTimeZone::getSimpleRulesNear(), and BasicTimeZone::getTimeZoneRulesAfter().

    double millisInDay;
    double day = ClockMath::floorDivide((double)time, (double)U_MILLIS_PER_DAY, millisInDay);
    mid = (int32_t)millisInDay;
    dayToFields(day, year, month, dom, dow, doy);

Generated by  Doxygen 1.6.0   Back to index