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

void Calendar::updateTime ( UErrorCode status  )  [private]

Recompute the time and update the status fields isTimeSet and areFieldsSet. Callers should check isTimeSet and only call this method if isTimeSet is false.

Parameters:
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.
Recompute the time and update the status fields isTimeSet and areFieldsSet. Callers should check isTimeSet and only call this method if isTimeSet is false.

Definition at line 3307 of file calendar.cpp.

References computeTime(), FALSE, fAreAllFieldsSet, fAreFieldsSet, fAreFieldsVirtuallySet, fIsTimeSet, isLenient(), TRUE, and U_FAILURE.

Referenced by complete().

{
    computeTime(status);
    if(U_FAILURE(status))
        return;

    // If we are lenient, we need to recompute the fields to normalize
    // the values.  Also, if we haven't set all the fields yet (i.e.,
    // in a newly-created object), we need to fill in the fields. [LIU]
    if (isLenient() || ! fAreAllFieldsSet) 
        fAreFieldsSet = FALSE;

    fIsTimeSet = TRUE;
    fAreFieldsVirtuallySet = FALSE;
}


Generated by  Doxygen 1.6.0   Back to index