Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: source/i18n/hebrwcal.cpp

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/i18n/hebrwcal.h ('k') | source/i18n/i18n.vcxproj » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/hebrwcal.cpp
diff --git a/source/i18n/hebrwcal.cpp b/source/i18n/hebrwcal.cpp
index aa16adf988bfe1159b34260e41ef3e863721719c..c5dc4079124384cedd4e3e63b6a3a5141efeb218 100644
--- a/source/i18n/hebrwcal.cpp
+++ b/source/i18n/hebrwcal.cpp
@@ -529,6 +529,13 @@ int32_t HebrewCalendar::handleGetYearLength(int32_t eyear) const {
return startOfYear(eyear+1, status) - startOfYear(eyear, status);
}
+void HebrewCalendar::validateField(UCalendarDateFields field, UErrorCode &status) {
+ if (field == UCAL_MONTH && !isLeapYear(handleGetExtendedYear()) && internalGet(UCAL_MONTH) == ADAR_1) {
+ status = U_ILLEGAL_ARGUMENT_ERROR;
+ return;
+ }
+ Calendar::validateField(field, status);
+}
//-------------------------------------------------------------------------
// Functions for converting from milliseconds to field values
//-------------------------------------------------------------------------
« no previous file with comments | « source/i18n/hebrwcal.h ('k') | source/i18n/i18n.vcxproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698