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

void Calendar::setTimeInMillis ( double  millis,
UErrorCode status 
) [protected, inherited]

Sets this Calendar's current time from the given long value.

Parameters:
millisthe new time in UTC milliseconds from the epoch.
statusOutput param set to success/failure code on exit. If any value previously set in the time field is invalid or restricted by leniency, this will be set to an error status. ICU 2.0

Sets this Calendar's current time from the given long value.

Parameters:
datethe new time in UTC milliseconds from the epoch.

Definition at line 1029 of file calendar.cpp.

References FALSE, Calendar::fAreAllFieldsSet, Calendar::fAreFieldsSet, Calendar::fAreFieldsVirtuallySet, Calendar::fFields, Calendar::fIsSet, Calendar::fIsTimeSet, Calendar::fStamp, Calendar::fTime, TRUE, U_FAILURE, and UCAL_FIELD_COUNT.

Referenced by Calendar::add(), CECalendar::CECalendar(), ChineseCalendar::ChineseCalendar(), Calendar::createInstance(), Calendar::fieldDifference(), GregorianCalendar::GregorianCalendar(), HebrewCalendar::HebrewCalendar(), IndianCalendar::IndianCalendar(), IslamicCalendar::IslamicCalendar(), JapaneseCalendar::JapaneseCalendar(), PersianCalendar::PersianCalendar(), GregorianCalendar::roll(), Calendar::roll(), and IslamicCalendar::setCivil().

                                                             {
    if(U_FAILURE(status)) 
        return;

    if (millis > MAX_MILLIS) {
        millis = MAX_MILLIS;
    } else if (millis < MIN_MILLIS) {
        millis = MIN_MILLIS;
    }

    fTime = millis;
    fAreFieldsSet = fAreAllFieldsSet = FALSE;
    fIsTimeSet = fAreFieldsVirtuallySet = TRUE;

    for (int32_t i=0; i<UCAL_FIELD_COUNT; ++i) {
        fFields[i]     = 0;
        fStamp[i]     = kUnset;
        fIsSet[i]     = FALSE;
    }
    

}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index