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

UBool DateIntervalInfo::stringNumeric ( int32_t  fieldWidth,
int32_t  anotherFieldWidth,
char  patternLetter 
) [static, private]

Check whether one field width is numeric while the other is string.

TODO (xji): make it general

Parameters:
fieldWidth one field width
anotherFieldWidth another field width
patternLetter pattern letter char
Returns:
true if one field width is numeric and the other is string, false otherwise.

For internal use only.

ICU 4.0

Definition at line 385 of file dtitvinf.cpp.

Referenced by getBestSkeleton().

                                                    {
    if ( patternLetter == 'M' ) {
        if ( fieldWidth <= 2 && anotherFieldWidth > 2 ||
             fieldWidth > 2 && anotherFieldWidth <= 2 ) {
            return true;
        }
    }
    return false;
}


Generated by  Doxygen 1.6.0   Back to index