Logo Search packages:      
Sourcecode: icu version File versions

void Calendar::setMinimalDaysInFirstWeek ( uint8_t  value  )  [inherited]

Sets what the minimal days required in the first week of the year are; For example, if the first week is defined as one that contains the first day of the first month of a year, call the method with value 1. If it must be a full week, use value 7.

value The given minimal days required in the first week of the year. ICU 2.0

Definition at line 2071 of file calendar.cpp.

References FALSE, and Calendar::fAreFieldsSet.

Referenced by CalendarRegressionTest::test4103271(), CalendarRegressionTest::Test4166109(), CalendarRegressionTest::Test4197699(), and CalendarRegressionTest::TestWeekShift().

    // Values less than 1 have the same effect as 1; values greater
    // than 7 have the same effect as 7. However, we normalize values
    // so operator== and so forth work.
    if (value < 1) {
        value = 1;
    } else if (value > 7) {
        value = 7;
    if (fMinimalDaysInFirstWeek != value) {
        fMinimalDaysInFirstWeek = value;
        fAreFieldsSet = FALSE;

Generated by  Doxygen 1.6.0   Back to index