diff --git a/headers/os/locale/DateFormat.h b/headers/os/locale/DateFormat.h index 2f9aad01eb..cee04e5543 100644 --- a/headers/os/locale/DateFormat.h +++ b/headers/os/locale/DateFormat.h @@ -84,10 +84,19 @@ public: BDate& output); private: + int _ConvertDayNumberToICU(int day) const; + U_ICU_NAMESPACE::DateFormat* _CreateDateFormatter( const BDateFormatStyle style) const; }; +inline int +BDateFormat::_ConvertDayNumberToICU(int day) const +{ + return day == 7 ? 1 : day + 1; +} + + #endif // _B_DATE_FORMAT_H_ diff --git a/src/kits/locale/DateFormat.cpp b/src/kits/locale/DateFormat.cpp index 09fe428656..b70d601915 100644 --- a/src/kits/locale/DateFormat.cpp +++ b/src/kits/locale/DateFormat.cpp @@ -366,7 +366,7 @@ BDateFormat::GetDayName(int day, BString& outName, } BStringByteSink stringConverter(&outName); - names[day].toUTF8(stringConverter); + names[_ConvertDayNumberToICU(day)].toUTF8(stringConverter); delete simpleFormat; return B_OK;