]>
git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/coptccal.h
2 *******************************************************************************
3 * Copyright (C) 2003 - 2013, International Business Machines Corporation and *
4 * others. All Rights Reserved. *
5 *******************************************************************************
11 #include "unicode/utypes.h"
13 #if !UCONFIG_NO_FORMATTING
15 #include "unicode/calendar.h"
21 * Implement the Coptic calendar system.
24 class CopticCalendar
: public CECalendar
{
28 * Useful constants for CopticCalendar.
33 * Constant for ωογτ/تﻮﺗ,
34 * the 1st month of the Coptic year.
39 * Constant for Παοπι/ﻪﺑﺎﺑ,
40 * the 2nd month of the Coptic year.
45 * Constant for Αθορ/رﻮﺗﺎﻫ,
46 * the 3rd month of the Coptic year.
51 * Constant for Χοιακ/ﻚﻬﻴﻛ,
52 * the 4th month of the Coptic year.
57 * Constant for Τωβι/طﻮﺒﻫ,
58 * the 5th month of the Coptic year.
63 * Constant for Μεϣιρ/ﺮﻴﺸﻣأ,
64 * the 6th month of the Coptic year.
69 * Constant for Παρεμϩατ/تﺎﻬﻣﺮﺑ,
70 * the 7th month of the Coptic year.
75 * Constant for Φαρμοθι/هدﻮﻣﺮﺑ,
76 * the 8th month of the Coptic year.
81 * Constant for Παϣαν/ﺲﻨﺸﺑ,
82 * the 9th month of the Coptic year.
87 * Constant for Παωνι/ﻪﻧؤﻮﺑ,
88 * the 10th month of the Coptic year.
93 * Constant for Επηπ/ﺐﻴﺑأ,
94 * the 11th month of the Coptic year.
99 * Constant for Μεϲωρη/ىﺮﺴﻣ,
100 * the 12th month of the Coptic year.
105 * Constant for Πικογϫι
106 * μαβοτ/ﺮﻴﻐﺼﻟا
107 * ﺮﻬﺸﻟا,
108 * the 13th month of the Coptic year.
114 BCE
, // Before the epoch
115 CE
// After the epoch
119 * Constructs a CopticCalendar based on the current time in the default time zone
120 * with the given locale.
122 * @param aLocale The given locale.
123 * @param success Indicates the status of CopticCalendar object construction.
124 * Returns U_ZERO_ERROR if constructed successfully.
127 CopticCalendar(const Locale
& aLocale
, UErrorCode
& success
);
133 CopticCalendar (const CopticCalendar
& other
);
139 virtual ~CopticCalendar();
142 * Create and return a polymorphic copy of this calendar.
143 * @return return a polymorphic copy of this calendar.
146 virtual Calendar
* clone(void) const;
149 * return the calendar type, "coptic"
150 * @return calendar type
153 const char * getType() const;
156 //-------------------------------------------------------------------------
157 // Calendar framework
158 //-------------------------------------------------------------------------
161 * Return the extended year defined by the current fields.
164 virtual int32_t handleGetExtendedYear();
167 * Compute fields from the JD
170 virtual void handleComputeFields(int32_t julianDay
, UErrorCode
&status
);
173 * Returns the date of the start of the default century
174 * @return start of century - in milliseconds since epoch, 1970
177 virtual UDate
defaultCenturyStart() const;
180 * Returns the year in which the default century begins
183 virtual int32_t defaultCenturyStartYear() const;
186 * Return the date offset from Julian
189 virtual int32_t getJDEpochOffset() const;
194 * Override Calendar Returns a unique class ID POLYMORPHICALLY. Pure virtual
195 * override. This method is to implement a simple version of RTTI, since not all C++
196 * compilers support genuine RTTI. Polymorphic operator==() and clone() methods call
199 * @return The class ID for this object. All objects of a given class have the
200 * same class ID. Objects of other classes have different class IDs.
203 virtual UClassID
getDynamicClassID(void) const;
206 * Return the class ID for this class. This is useful only for comparing to a return
207 * value from getDynamicClassID(). For example:
209 * Base* polymorphic_pointer = createPolymorphicObject();
210 * if (polymorphic_pointer->getDynamicClassID() ==
211 * Derived::getStaticClassID()) ...
213 * @return The class ID for all objects of this class.
216 U_I18N_API
static UClassID U_EXPORT2
getStaticClassID(void);
219 // We do not want to introduce this API in ICU4C.
220 // It was accidentally introduced in ICU4J as a public API.
222 //-------------------------------------------------------------------------
223 // Calendar system Conversion methods...
224 //-------------------------------------------------------------------------
226 * Convert an Coptic year, month, and day to a Julian day.
228 * @param year the extended year
229 * @param month the month
234 static int32_t copticToJD(int32_t year
, int32_t month
, int32_t day
);
240 #endif /* #if !UCONFIG_NO_FORMATTING */
241 #endif /* COPTCCAL_H */