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

void Calendar::set ( UCalendarDateFields  field,
int32_t  value 
) [inherited]

Sets the given time field with the given value.

Parameters:
field The given time field.
value The value to be set for the given time field. ICU 2.6.

Definition at line 1048 of file calendar.cpp.

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

{
    if (fAreFieldsVirtuallySet) {
        UErrorCode ec = U_ZERO_ERROR;
        computeFields(ec);
    }
    fFields[field]     = value;
    fStamp[field]     = fNextStamp++;
    fIsSet[field]     = TRUE; // Remove later
    fIsTimeSet = fAreFieldsSet = fAreFieldsVirtuallySet = FALSE;
}


Generated by  Doxygen 1.6.0   Back to index