From 4cdb854219094904e033428006fbaed6221d74b5 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Tue, 8 Feb 2011 22:14:40 +0100 Subject: locales34: #i116701# display all digits of era year in era based calendars also for SHORT_YEAR --- i18npool/source/calendar/calendar_gregorian.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'i18npool/source/calendar') diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index 727a6f601ba3..0ba91c0587d8 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -1003,9 +1003,11 @@ Calendar_gregorian::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 sprintf(aStr, "%02d", value); // #100211# - checked break; case CalendarDisplayCode::SHORT_YEAR: - // Take last 2 digits, or only one if vallue<10, for example, + // Take last 2 digits, or only one if value<10, for example, // in case of the Gengou calendar. - if (value < 100) + // #i116701# For values in non-Gregorian era years use all + // digits. + if (value < 100 || eraArray) sprintf(aStr, "%d", value); // #100211# - checked else sprintf(aStr, "%02d", value % 100); // #100211# - checked -- cgit