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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « source/i18n/hebrwcal.h ('k') | source/i18n/i18n.vcxproj » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ****************************************************************************** 2 ******************************************************************************
3 * Copyright (C) 2003-2013, International Business Machines Corporation 3 * Copyright (C) 2003-2013, International Business Machines Corporation
4 * and others. All Rights Reserved. 4 * and others. All Rights Reserved.
5 ****************************************************************************** 5 ******************************************************************************
6 * 6 *
7 * File HEBRWCAL.CPP 7 * File HEBRWCAL.CPP
8 * 8 *
9 * Modification History: 9 * Modification History:
10 * 10 *
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 522
523 /** 523 /**
524 * Returns the number of days in the given Hebrew year 524 * Returns the number of days in the given Hebrew year
525 * @internal 525 * @internal
526 */ 526 */
527 int32_t HebrewCalendar::handleGetYearLength(int32_t eyear) const { 527 int32_t HebrewCalendar::handleGetYearLength(int32_t eyear) const {
528 UErrorCode status = U_ZERO_ERROR; 528 UErrorCode status = U_ZERO_ERROR;
529 return startOfYear(eyear+1, status) - startOfYear(eyear, status); 529 return startOfYear(eyear+1, status) - startOfYear(eyear, status);
530 } 530 }
531 531
532 void HebrewCalendar::validateField(UCalendarDateFields field, UErrorCode &status ) {
533 if (field == UCAL_MONTH && !isLeapYear(handleGetExtendedYear()) && internalG et(UCAL_MONTH) == ADAR_1) {
534 status = U_ILLEGAL_ARGUMENT_ERROR;
535 return;
536 }
537 Calendar::validateField(field, status);
538 }
532 //------------------------------------------------------------------------- 539 //-------------------------------------------------------------------------
533 // Functions for converting from milliseconds to field values 540 // Functions for converting from milliseconds to field values
534 //------------------------------------------------------------------------- 541 //-------------------------------------------------------------------------
535 542
536 /** 543 /**
537 * Subclasses may override this method to compute several fields 544 * Subclasses may override this method to compute several fields
538 * specific to each calendar system. These are: 545 * specific to each calendar system. These are:
539 * 546 *
540 * <ul><li>ERA 547 * <ul><li>ERA
541 * <li>YEAR 548 * <li>YEAR
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 return gSystemDefaultCenturyStartYear; 720 return gSystemDefaultCenturyStartYear;
714 } 721 }
715 722
716 723
717 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(HebrewCalendar) 724 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(HebrewCalendar)
718 725
719 U_NAMESPACE_END 726 U_NAMESPACE_END
720 727
721 #endif // UCONFIG_NO_FORMATTING 728 #endif // UCONFIG_NO_FORMATTING
722 729
OLDNEW
« 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