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:
millis the new time in UTC milliseconds from the epoch.
status Output 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:
date the new time in UTC milliseconds from the epoch.

Definition at line 1000 of file calendar.cpp.

References FALSE, Calendar::fAreAllFieldsSet, Calendar::fAreFieldsSet, Calendar::fAreFieldsVirtuallySet, Calendar::fIsTimeSet, Calendar::fTime, TRUE, and U_FAILURE.

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;
}


Generated by  Doxygen 1.6.0   Back to index