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

void Calendar::clear ( UCalendarDateFields  field  )  [inherited]

Clears the value in the given time field, both making it unset and assigning it a value of zero. This field value will be determined during the next resolving of time into time fields.

Parameters:
field The time field to be cleared. ICU 2.6.

Definition at line 1094 of file calendar.cpp.

References Calendar::computeFields(), FALSE, Calendar::fAreAllFieldsSet, Calendar::fAreFieldsSet, Calendar::fAreFieldsVirtuallySet, Calendar::fFields, Calendar::fIsSet, Calendar::fIsTimeSet, Calendar::fStamp, and U_ZERO_ERROR.

{
    if (fAreFieldsVirtuallySet) {
        UErrorCode ec = U_ZERO_ERROR;
        computeFields(ec);
    }
    fFields[field]         = 0;
    fStamp[field]         = kUnset;
    fIsSet[field]         = FALSE; // Remove later
    fIsTimeSet = fAreFieldsSet = fAreAllFieldsSet = fAreFieldsVirtuallySet = FALSE;
}


Generated by  Doxygen 1.6.0   Back to index