1*0e209d39SAndroid Build Coastguard Worker // © 2016 and later: Unicode, Inc. and others. 2*0e209d39SAndroid Build Coastguard Worker // License & terms of use: http://www.unicode.org/copyright.html 3*0e209d39SAndroid Build Coastguard Worker /* 4*0e209d39SAndroid Build Coastguard Worker ******************************************************************************* 5*0e209d39SAndroid Build Coastguard Worker * Copyright (C) 2003 - 2013, International Business Machines Corporation and * 6*0e209d39SAndroid Build Coastguard Worker * others. All Rights Reserved. * 7*0e209d39SAndroid Build Coastguard Worker ******************************************************************************* 8*0e209d39SAndroid Build Coastguard Worker */ 9*0e209d39SAndroid Build Coastguard Worker 10*0e209d39SAndroid Build Coastguard Worker #ifndef ETHPCCAL_H 11*0e209d39SAndroid Build Coastguard Worker #define ETHPCCAL_H 12*0e209d39SAndroid Build Coastguard Worker 13*0e209d39SAndroid Build Coastguard Worker #include "unicode/utypes.h" 14*0e209d39SAndroid Build Coastguard Worker 15*0e209d39SAndroid Build Coastguard Worker #if !UCONFIG_NO_FORMATTING 16*0e209d39SAndroid Build Coastguard Worker 17*0e209d39SAndroid Build Coastguard Worker #include "unicode/calendar.h" 18*0e209d39SAndroid Build Coastguard Worker #include "cecal.h" 19*0e209d39SAndroid Build Coastguard Worker 20*0e209d39SAndroid Build Coastguard Worker U_NAMESPACE_BEGIN 21*0e209d39SAndroid Build Coastguard Worker 22*0e209d39SAndroid Build Coastguard Worker /** 23*0e209d39SAndroid Build Coastguard Worker * Implement the Ethiopic calendar system. 24*0e209d39SAndroid Build Coastguard Worker * @internal 25*0e209d39SAndroid Build Coastguard Worker */ 26*0e209d39SAndroid Build Coastguard Worker class EthiopicCalendar : public CECalendar { 27*0e209d39SAndroid Build Coastguard Worker 28*0e209d39SAndroid Build Coastguard Worker public: 29*0e209d39SAndroid Build Coastguard Worker /** 30*0e209d39SAndroid Build Coastguard Worker * Useful constants for EthiopicCalendar. 31*0e209d39SAndroid Build Coastguard Worker * @internal 32*0e209d39SAndroid Build Coastguard Worker */ 33*0e209d39SAndroid Build Coastguard Worker enum EMonths { 34*0e209d39SAndroid Build Coastguard Worker /** 35*0e209d39SAndroid Build Coastguard Worker * Constant for መስከረም, the 1st month of the Ethiopic year. 36*0e209d39SAndroid Build Coastguard Worker */ 37*0e209d39SAndroid Build Coastguard Worker MESKEREM, 38*0e209d39SAndroid Build Coastguard Worker 39*0e209d39SAndroid Build Coastguard Worker /** 40*0e209d39SAndroid Build Coastguard Worker * Constant for ጥቅምት, the 2nd month of the Ethiopic year. 41*0e209d39SAndroid Build Coastguard Worker */ 42*0e209d39SAndroid Build Coastguard Worker TEKEMT, 43*0e209d39SAndroid Build Coastguard Worker 44*0e209d39SAndroid Build Coastguard Worker /** 45*0e209d39SAndroid Build Coastguard Worker * Constant for ኅዳር, the 3rd month of the Ethiopic year. 46*0e209d39SAndroid Build Coastguard Worker */ 47*0e209d39SAndroid Build Coastguard Worker HEDAR, 48*0e209d39SAndroid Build Coastguard Worker 49*0e209d39SAndroid Build Coastguard Worker /** 50*0e209d39SAndroid Build Coastguard Worker * Constant for ታኅሣሥ, the 4th month of the Ethiopic year. 51*0e209d39SAndroid Build Coastguard Worker */ 52*0e209d39SAndroid Build Coastguard Worker TAHSAS, 53*0e209d39SAndroid Build Coastguard Worker 54*0e209d39SAndroid Build Coastguard Worker /** 55*0e209d39SAndroid Build Coastguard Worker * Constant for ጥር, the 5th month of the Ethiopic year. 56*0e209d39SAndroid Build Coastguard Worker */ 57*0e209d39SAndroid Build Coastguard Worker TER, 58*0e209d39SAndroid Build Coastguard Worker 59*0e209d39SAndroid Build Coastguard Worker /** 60*0e209d39SAndroid Build Coastguard Worker * Constant for የካቲት, the 6th month of the Ethiopic year. 61*0e209d39SAndroid Build Coastguard Worker */ 62*0e209d39SAndroid Build Coastguard Worker YEKATIT, 63*0e209d39SAndroid Build Coastguard Worker 64*0e209d39SAndroid Build Coastguard Worker /** 65*0e209d39SAndroid Build Coastguard Worker * Constant for መጋቢት, the 7th month of the Ethiopic year. 66*0e209d39SAndroid Build Coastguard Worker */ 67*0e209d39SAndroid Build Coastguard Worker MEGABIT, 68*0e209d39SAndroid Build Coastguard Worker 69*0e209d39SAndroid Build Coastguard Worker /** 70*0e209d39SAndroid Build Coastguard Worker * Constant for ሚያዝያ, the 8th month of the Ethiopic year. 71*0e209d39SAndroid Build Coastguard Worker */ 72*0e209d39SAndroid Build Coastguard Worker MIAZIA, 73*0e209d39SAndroid Build Coastguard Worker 74*0e209d39SAndroid Build Coastguard Worker /** 75*0e209d39SAndroid Build Coastguard Worker * Constant for ግንቦት, the 9th month of the Ethiopic year. 76*0e209d39SAndroid Build Coastguard Worker */ 77*0e209d39SAndroid Build Coastguard Worker GENBOT, 78*0e209d39SAndroid Build Coastguard Worker 79*0e209d39SAndroid Build Coastguard Worker /** 80*0e209d39SAndroid Build Coastguard Worker * Constant for ሰኔ, the 10th month of the Ethiopic year. 81*0e209d39SAndroid Build Coastguard Worker */ 82*0e209d39SAndroid Build Coastguard Worker SENE, 83*0e209d39SAndroid Build Coastguard Worker 84*0e209d39SAndroid Build Coastguard Worker /** 85*0e209d39SAndroid Build Coastguard Worker * Constant for ሐምሌ, the 11th month of the Ethiopic year. 86*0e209d39SAndroid Build Coastguard Worker */ 87*0e209d39SAndroid Build Coastguard Worker HAMLE, 88*0e209d39SAndroid Build Coastguard Worker 89*0e209d39SAndroid Build Coastguard Worker /** 90*0e209d39SAndroid Build Coastguard Worker * Constant for ነሐሴ, the 12th month of the Ethiopic year. 91*0e209d39SAndroid Build Coastguard Worker */ 92*0e209d39SAndroid Build Coastguard Worker NEHASSE, 93*0e209d39SAndroid Build Coastguard Worker 94*0e209d39SAndroid Build Coastguard Worker /** 95*0e209d39SAndroid Build Coastguard Worker * Constant for ጳጉሜን, the 13th month of the Ethiopic year. 96*0e209d39SAndroid Build Coastguard Worker */ 97*0e209d39SAndroid Build Coastguard Worker PAGUMEN 98*0e209d39SAndroid Build Coastguard Worker }; 99*0e209d39SAndroid Build Coastguard Worker 100*0e209d39SAndroid Build Coastguard Worker enum EEras { 101*0e209d39SAndroid Build Coastguard Worker AMETE_ALEM, // Before the epoch 102*0e209d39SAndroid Build Coastguard Worker AMETE_MIHRET // After the epoch 103*0e209d39SAndroid Build Coastguard Worker }; 104*0e209d39SAndroid Build Coastguard Worker 105*0e209d39SAndroid Build Coastguard Worker /** 106*0e209d39SAndroid Build Coastguard Worker * Constructs a EthiopicCalendar based on the current time in the default time zone 107*0e209d39SAndroid Build Coastguard Worker * with the given locale. 108*0e209d39SAndroid Build Coastguard Worker * 109*0e209d39SAndroid Build Coastguard Worker * @param aLocale The given locale. 110*0e209d39SAndroid Build Coastguard Worker * @param success Indicates the status of EthiopicCalendar object construction. 111*0e209d39SAndroid Build Coastguard Worker * Returns U_ZERO_ERROR if constructed successfully. 112*0e209d39SAndroid Build Coastguard Worker * @param type Whether this Ethiopic calendar use Amete Mihrret (default) or 113*0e209d39SAndroid Build Coastguard Worker * only use Amete Alem for all the time. 114*0e209d39SAndroid Build Coastguard Worker * @internal 115*0e209d39SAndroid Build Coastguard Worker */ 116*0e209d39SAndroid Build Coastguard Worker EthiopicCalendar(const Locale& aLocale, UErrorCode& success); 117*0e209d39SAndroid Build Coastguard Worker 118*0e209d39SAndroid Build Coastguard Worker /** 119*0e209d39SAndroid Build Coastguard Worker * Copy Constructor 120*0e209d39SAndroid Build Coastguard Worker * @internal 121*0e209d39SAndroid Build Coastguard Worker */ 122*0e209d39SAndroid Build Coastguard Worker EthiopicCalendar(const EthiopicCalendar& other) = default; 123*0e209d39SAndroid Build Coastguard Worker 124*0e209d39SAndroid Build Coastguard Worker /** 125*0e209d39SAndroid Build Coastguard Worker * Destructor. 126*0e209d39SAndroid Build Coastguard Worker * @internal 127*0e209d39SAndroid Build Coastguard Worker */ 128*0e209d39SAndroid Build Coastguard Worker virtual ~EthiopicCalendar(); 129*0e209d39SAndroid Build Coastguard Worker 130*0e209d39SAndroid Build Coastguard Worker /** 131*0e209d39SAndroid Build Coastguard Worker * Create and return a polymorphic copy of this calendar. 132*0e209d39SAndroid Build Coastguard Worker * @return return a polymorphic copy of this calendar. 133*0e209d39SAndroid Build Coastguard Worker * @internal 134*0e209d39SAndroid Build Coastguard Worker */ 135*0e209d39SAndroid Build Coastguard Worker virtual EthiopicCalendar* clone() const override; 136*0e209d39SAndroid Build Coastguard Worker 137*0e209d39SAndroid Build Coastguard Worker /** 138*0e209d39SAndroid Build Coastguard Worker * Return the calendar type, "ethiopic" 139*0e209d39SAndroid Build Coastguard Worker * @return calendar type 140*0e209d39SAndroid Build Coastguard Worker * @internal 141*0e209d39SAndroid Build Coastguard Worker */ 142*0e209d39SAndroid Build Coastguard Worker virtual const char * getType() const override; 143*0e209d39SAndroid Build Coastguard Worker 144*0e209d39SAndroid Build Coastguard Worker /** 145*0e209d39SAndroid Build Coastguard Worker * @return The related Gregorian year; will be obtained by modifying the value 146*0e209d39SAndroid Build Coastguard Worker * obtained by get from UCAL_EXTENDED_YEAR field 147*0e209d39SAndroid Build Coastguard Worker * @internal 148*0e209d39SAndroid Build Coastguard Worker */ 149*0e209d39SAndroid Build Coastguard Worker virtual int32_t getRelatedYear(UErrorCode &status) const override; 150*0e209d39SAndroid Build Coastguard Worker 151*0e209d39SAndroid Build Coastguard Worker /** 152*0e209d39SAndroid Build Coastguard Worker * @param year The related Gregorian year to set; will be modified as necessary then 153*0e209d39SAndroid Build Coastguard Worker * set in UCAL_EXTENDED_YEAR field 154*0e209d39SAndroid Build Coastguard Worker * @internal 155*0e209d39SAndroid Build Coastguard Worker */ 156*0e209d39SAndroid Build Coastguard Worker virtual void setRelatedYear(int32_t year) override; 157*0e209d39SAndroid Build Coastguard Worker 158*0e209d39SAndroid Build Coastguard Worker protected: 159*0e209d39SAndroid Build Coastguard Worker //------------------------------------------------------------------------- 160*0e209d39SAndroid Build Coastguard Worker // Calendar framework 161*0e209d39SAndroid Build Coastguard Worker //------------------------------------------------------------------------- 162*0e209d39SAndroid Build Coastguard Worker 163*0e209d39SAndroid Build Coastguard Worker /** 164*0e209d39SAndroid Build Coastguard Worker * Return the extended year defined by the current fields. 165*0e209d39SAndroid Build Coastguard Worker * This calendar uses both AMETE_ALEM and AMETE_MIHRET. 166*0e209d39SAndroid Build Coastguard Worker * 167*0e209d39SAndroid Build Coastguard Worker * EXTENDED_YEAR ERA YEAR 168*0e209d39SAndroid Build Coastguard Worker * 0 AMETE_ALEM 5500 169*0e209d39SAndroid Build Coastguard Worker * 1 AMETE_MIHRET 1 170*0e209d39SAndroid Build Coastguard Worker * @internal 171*0e209d39SAndroid Build Coastguard Worker */ 172*0e209d39SAndroid Build Coastguard Worker virtual int32_t handleGetExtendedYear(UErrorCode& status) override; 173*0e209d39SAndroid Build Coastguard Worker 174*0e209d39SAndroid Build Coastguard Worker /** 175*0e209d39SAndroid Build Coastguard Worker * Compute fields from the JD 176*0e209d39SAndroid Build Coastguard Worker * @internal 177*0e209d39SAndroid Build Coastguard Worker */ 178*0e209d39SAndroid Build Coastguard Worker virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) override; 179*0e209d39SAndroid Build Coastguard Worker 180*0e209d39SAndroid Build Coastguard Worker DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY 181*0e209d39SAndroid Build Coastguard Worker 182*0e209d39SAndroid Build Coastguard Worker /** 183*0e209d39SAndroid Build Coastguard Worker * Return the date offset from Julian 184*0e209d39SAndroid Build Coastguard Worker * @internal 185*0e209d39SAndroid Build Coastguard Worker */ 186*0e209d39SAndroid Build Coastguard Worker virtual int32_t getJDEpochOffset() const override; 187*0e209d39SAndroid Build Coastguard Worker 188*0e209d39SAndroid Build Coastguard Worker public: 189*0e209d39SAndroid Build Coastguard Worker /** 190*0e209d39SAndroid Build Coastguard Worker * Override Calendar Returns a unique class ID POLYMORPHICALLY. Pure virtual 191*0e209d39SAndroid Build Coastguard Worker * override. This method is to implement a simple version of RTTI, since not all C++ 192*0e209d39SAndroid Build Coastguard Worker * compilers support genuine RTTI. Polymorphic operator==() and clone() methods call 193*0e209d39SAndroid Build Coastguard Worker * this method. 194*0e209d39SAndroid Build Coastguard Worker * 195*0e209d39SAndroid Build Coastguard Worker * @return The class ID for this object. All objects of a given class have the 196*0e209d39SAndroid Build Coastguard Worker * same class ID. Objects of other classes have different class IDs. 197*0e209d39SAndroid Build Coastguard Worker * @internal 198*0e209d39SAndroid Build Coastguard Worker */ 199*0e209d39SAndroid Build Coastguard Worker virtual UClassID getDynamicClassID() const override; 200*0e209d39SAndroid Build Coastguard Worker 201*0e209d39SAndroid Build Coastguard Worker /** 202*0e209d39SAndroid Build Coastguard Worker * Return the class ID for this class. This is useful only for comparing to a return 203*0e209d39SAndroid Build Coastguard Worker * value from getDynamicClassID(). For example: 204*0e209d39SAndroid Build Coastguard Worker * 205*0e209d39SAndroid Build Coastguard Worker * Base* polymorphic_pointer = createPolymorphicObject(); 206*0e209d39SAndroid Build Coastguard Worker * if (polymorphic_pointer->getDynamicClassID() == 207*0e209d39SAndroid Build Coastguard Worker * Derived::getStaticClassID()) ... 208*0e209d39SAndroid Build Coastguard Worker * 209*0e209d39SAndroid Build Coastguard Worker * @return The class ID for all objects of this class. 210*0e209d39SAndroid Build Coastguard Worker * @internal 211*0e209d39SAndroid Build Coastguard Worker */ 212*0e209d39SAndroid Build Coastguard Worker U_I18N_API static UClassID U_EXPORT2 getStaticClassID(); 213*0e209d39SAndroid Build Coastguard Worker 214*0e209d39SAndroid Build Coastguard Worker #if 0 215*0e209d39SAndroid Build Coastguard Worker // We do not want to introduce this API in ICU4C. 216*0e209d39SAndroid Build Coastguard Worker // It was accidentally introduced in ICU4J as a public API. 217*0e209d39SAndroid Build Coastguard Worker 218*0e209d39SAndroid Build Coastguard Worker public: 219*0e209d39SAndroid Build Coastguard Worker //------------------------------------------------------------------------- 220*0e209d39SAndroid Build Coastguard Worker // Calendar system Conversion methods... 221*0e209d39SAndroid Build Coastguard Worker //------------------------------------------------------------------------- 222*0e209d39SAndroid Build Coastguard Worker 223*0e209d39SAndroid Build Coastguard Worker /** 224*0e209d39SAndroid Build Coastguard Worker * Convert an Ethiopic year, month, and day to a Julian day. 225*0e209d39SAndroid Build Coastguard Worker * 226*0e209d39SAndroid Build Coastguard Worker * @param year the extended year 227*0e209d39SAndroid Build Coastguard Worker * @param month the month 228*0e209d39SAndroid Build Coastguard Worker * @param day the day 229*0e209d39SAndroid Build Coastguard Worker * @return Julian day 230*0e209d39SAndroid Build Coastguard Worker * @internal 231*0e209d39SAndroid Build Coastguard Worker */ 232*0e209d39SAndroid Build Coastguard Worker int32_t ethiopicToJD(int32_t year, int32_t month, int32_t day); 233*0e209d39SAndroid Build Coastguard Worker #endif 234*0e209d39SAndroid Build Coastguard Worker }; 235*0e209d39SAndroid Build Coastguard Worker 236*0e209d39SAndroid Build Coastguard Worker /** 237*0e209d39SAndroid Build Coastguard Worker * Implement the Ethiopic Amete Alem calendar system. 238*0e209d39SAndroid Build Coastguard Worker * @internal 239*0e209d39SAndroid Build Coastguard Worker */ 240*0e209d39SAndroid Build Coastguard Worker class EthiopicAmeteAlemCalendar : public EthiopicCalendar { 241*0e209d39SAndroid Build Coastguard Worker 242*0e209d39SAndroid Build Coastguard Worker public: 243*0e209d39SAndroid Build Coastguard Worker /** 244*0e209d39SAndroid Build Coastguard Worker * Constructs a EthiopicAmeteAlemCalendar based on the current time in the default time zone 245*0e209d39SAndroid Build Coastguard Worker * with the given locale. 246*0e209d39SAndroid Build Coastguard Worker * 247*0e209d39SAndroid Build Coastguard Worker * @param aLocale The given locale. 248*0e209d39SAndroid Build Coastguard Worker * @param success Indicates the status of EthiopicCalendar object construction. 249*0e209d39SAndroid Build Coastguard Worker * Returns U_ZERO_ERROR if constructed successfully. 250*0e209d39SAndroid Build Coastguard Worker * @internal 251*0e209d39SAndroid Build Coastguard Worker */ 252*0e209d39SAndroid Build Coastguard Worker EthiopicAmeteAlemCalendar(const Locale& aLocale, UErrorCode& success); 253*0e209d39SAndroid Build Coastguard Worker 254*0e209d39SAndroid Build Coastguard Worker /** 255*0e209d39SAndroid Build Coastguard Worker * Copy Constructor 256*0e209d39SAndroid Build Coastguard Worker * @internal 257*0e209d39SAndroid Build Coastguard Worker */ 258*0e209d39SAndroid Build Coastguard Worker EthiopicAmeteAlemCalendar(const EthiopicAmeteAlemCalendar& other) = default; 259*0e209d39SAndroid Build Coastguard Worker 260*0e209d39SAndroid Build Coastguard Worker /** 261*0e209d39SAndroid Build Coastguard Worker * Destructor. 262*0e209d39SAndroid Build Coastguard Worker * @internal 263*0e209d39SAndroid Build Coastguard Worker */ 264*0e209d39SAndroid Build Coastguard Worker virtual ~EthiopicAmeteAlemCalendar(); 265*0e209d39SAndroid Build Coastguard Worker 266*0e209d39SAndroid Build Coastguard Worker /** 267*0e209d39SAndroid Build Coastguard Worker * Create and return a polymorphic copy of this calendar. 268*0e209d39SAndroid Build Coastguard Worker * @return return a polymorphic copy of this calendar. 269*0e209d39SAndroid Build Coastguard Worker * @internal 270*0e209d39SAndroid Build Coastguard Worker */ 271*0e209d39SAndroid Build Coastguard Worker virtual EthiopicAmeteAlemCalendar* clone() const override; 272*0e209d39SAndroid Build Coastguard Worker 273*0e209d39SAndroid Build Coastguard Worker /** 274*0e209d39SAndroid Build Coastguard Worker * Return the calendar type, "ethiopic-amete-alem" 275*0e209d39SAndroid Build Coastguard Worker * @return calendar type 276*0e209d39SAndroid Build Coastguard Worker * @internal 277*0e209d39SAndroid Build Coastguard Worker */ 278*0e209d39SAndroid Build Coastguard Worker virtual const char * getType() const override; 279*0e209d39SAndroid Build Coastguard Worker 280*0e209d39SAndroid Build Coastguard Worker /** 281*0e209d39SAndroid Build Coastguard Worker * Override Calendar Returns a unique class ID POLYMORPHICALLY. Pure virtual 282*0e209d39SAndroid Build Coastguard Worker * override. This method is to implement a simple version of RTTI, since not all C++ 283*0e209d39SAndroid Build Coastguard Worker * compilers support genuine RTTI. Polymorphic operator==() and clone() methods call 284*0e209d39SAndroid Build Coastguard Worker * this method. 285*0e209d39SAndroid Build Coastguard Worker * 286*0e209d39SAndroid Build Coastguard Worker * @return The class ID for this object. All objects of a given class have the 287*0e209d39SAndroid Build Coastguard Worker * same class ID. Objects of other classes have different class IDs. 288*0e209d39SAndroid Build Coastguard Worker * @internal 289*0e209d39SAndroid Build Coastguard Worker */ 290*0e209d39SAndroid Build Coastguard Worker virtual UClassID getDynamicClassID() const override; 291*0e209d39SAndroid Build Coastguard Worker 292*0e209d39SAndroid Build Coastguard Worker /** 293*0e209d39SAndroid Build Coastguard Worker * Return the class ID for this class. This is useful only for comparing to a return 294*0e209d39SAndroid Build Coastguard Worker * value from getDynamicClassID(). For example: 295*0e209d39SAndroid Build Coastguard Worker * 296*0e209d39SAndroid Build Coastguard Worker * Base* polymorphic_pointer = createPolymorphicObject(); 297*0e209d39SAndroid Build Coastguard Worker * if (polymorphic_pointer->getDynamicClassID() == 298*0e209d39SAndroid Build Coastguard Worker * Derived::getStaticClassID()) ... 299*0e209d39SAndroid Build Coastguard Worker * 300*0e209d39SAndroid Build Coastguard Worker * @return The class ID for all objects of this class. 301*0e209d39SAndroid Build Coastguard Worker * @internal 302*0e209d39SAndroid Build Coastguard Worker */ 303*0e209d39SAndroid Build Coastguard Worker U_I18N_API static UClassID U_EXPORT2 getStaticClassID(); 304*0e209d39SAndroid Build Coastguard Worker 305*0e209d39SAndroid Build Coastguard Worker /** 306*0e209d39SAndroid Build Coastguard Worker * @return The related Gregorian year; will be obtained by modifying the value 307*0e209d39SAndroid Build Coastguard Worker * obtained by get from UCAL_EXTENDED_YEAR field 308*0e209d39SAndroid Build Coastguard Worker * @internal 309*0e209d39SAndroid Build Coastguard Worker */ 310*0e209d39SAndroid Build Coastguard Worker virtual int32_t getRelatedYear(UErrorCode &status) const override; 311*0e209d39SAndroid Build Coastguard Worker 312*0e209d39SAndroid Build Coastguard Worker /** 313*0e209d39SAndroid Build Coastguard Worker * @param year The related Gregorian year to set; will be modified as necessary then 314*0e209d39SAndroid Build Coastguard Worker * set in UCAL_EXTENDED_YEAR field 315*0e209d39SAndroid Build Coastguard Worker * @internal 316*0e209d39SAndroid Build Coastguard Worker */ 317*0e209d39SAndroid Build Coastguard Worker virtual void setRelatedYear(int32_t year) override; 318*0e209d39SAndroid Build Coastguard Worker 319*0e209d39SAndroid Build Coastguard Worker protected: 320*0e209d39SAndroid Build Coastguard Worker //------------------------------------------------------------------------- 321*0e209d39SAndroid Build Coastguard Worker // Calendar framework 322*0e209d39SAndroid Build Coastguard Worker //------------------------------------------------------------------------- 323*0e209d39SAndroid Build Coastguard Worker 324*0e209d39SAndroid Build Coastguard Worker /** 325*0e209d39SAndroid Build Coastguard Worker * Return the extended year defined by the current fields. 326*0e209d39SAndroid Build Coastguard Worker * This calendar use only AMETE_ALEM for the era. 327*0e209d39SAndroid Build Coastguard Worker * 328*0e209d39SAndroid Build Coastguard Worker * EXTENDED_YEAR ERA YEAR 329*0e209d39SAndroid Build Coastguard Worker * 0 AMETE_ALEM 5500 330*0e209d39SAndroid Build Coastguard Worker * 1 AMETE_ALEM 5501 331*0e209d39SAndroid Build Coastguard Worker * @internal 332*0e209d39SAndroid Build Coastguard Worker */ 333*0e209d39SAndroid Build Coastguard Worker virtual int32_t handleGetExtendedYear(UErrorCode& status) override; 334*0e209d39SAndroid Build Coastguard Worker 335*0e209d39SAndroid Build Coastguard Worker /** 336*0e209d39SAndroid Build Coastguard Worker * Compute fields from the JD 337*0e209d39SAndroid Build Coastguard Worker * @internal 338*0e209d39SAndroid Build Coastguard Worker */ 339*0e209d39SAndroid Build Coastguard Worker virtual void handleComputeFields(int32_t julianDay, UErrorCode &status) override; 340*0e209d39SAndroid Build Coastguard Worker 341*0e209d39SAndroid Build Coastguard Worker /** 342*0e209d39SAndroid Build Coastguard Worker * Calculate the limit for a specified type of limit and field 343*0e209d39SAndroid Build Coastguard Worker * @internal 344*0e209d39SAndroid Build Coastguard Worker */ 345*0e209d39SAndroid Build Coastguard Worker virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const override; 346*0e209d39SAndroid Build Coastguard Worker /** 347*0e209d39SAndroid Build Coastguard Worker * Returns the year in which the default century begins 348*0e209d39SAndroid Build Coastguard Worker * @internal 349*0e209d39SAndroid Build Coastguard Worker */ 350*0e209d39SAndroid Build Coastguard Worker virtual int32_t defaultCenturyStartYear() const override; 351*0e209d39SAndroid Build Coastguard Worker }; 352*0e209d39SAndroid Build Coastguard Worker 353*0e209d39SAndroid Build Coastguard Worker U_NAMESPACE_END 354*0e209d39SAndroid Build Coastguard Worker #endif /* #if !UCONFIG_NO_FORMATTING */ 355*0e209d39SAndroid Build Coastguard Worker #endif /* ETHPCCAL_H */ 356*0e209d39SAndroid Build Coastguard Worker //eof 357