summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorEike Rathke <erack@openoffice.org>2011-02-08 22:14:40 +0100
committerEike Rathke <erack@openoffice.org>2011-02-08 22:14:40 +0100
commit4cdb854219094904e033428006fbaed6221d74b5 (patch)
treeb77a44a71a99f5876b25b5d2322cf21d30dd71c4 /i18npool
parent59de99050dfb478e3cfb0f355808ce676bc03888 (diff)
locales34: #i116701# display all digits of era year in era based calendars also for SHORT_YEAR
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/calendar/calendar_gregorian.cxx6
1 files changed, 4 insertions, 2 deletions
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