]>
git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/coptccal.h
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 *******************************************************************************
5 * Copyright (C) 2003 - 2013, International Business Machines Corporation and *
6 * others. All Rights Reserved. *
7 *******************************************************************************
13 #include "unicode/utypes.h"
15 #if !UCONFIG_NO_FORMATTING
17 #include "unicode/calendar.h"
23 * Implement the Coptic calendar system.
26 class CopticCalendar
: public CECalendar
{
30 * Useful constants for CopticCalendar.
35 * Constant for ωογτ/تﻮﺗ,
36 * the 1st month of the Coptic year.
41 * Constant for Παοπι/ﻪﺑﺎﺑ,
42 * the 2nd month of the Coptic year.
47 * Constant for Αθορ/رﻮﺗﺎﻫ,
48 * the 3rd month of the Coptic year.
53 * Constant for Χοιακ/ﻚﻬﻴﻛ,
54 * the 4th month of the Coptic year.
59 * Constant for Τωβι/طﻮﺒﻫ,
60 * the 5th month of the Coptic year.
65 * Constant for Μεϣιρ/ﺮﻴﺸﻣأ,
66 * the 6th month of the Coptic year.
71 * Constant for Παρεμϩατ/تﺎﻬﻣﺮﺑ,
72 * the 7th month of the Coptic year.
77 * Constant for Φαρμοθι/هدﻮﻣﺮﺑ,
78 * the 8th month of the Coptic year.
83 * Constant for Παϣαν/ﺲﻨﺸﺑ,
84 * the 9th month of the Coptic year.
89 * Constant for Παωνι/ﻪﻧؤﻮﺑ,
90 * the 10th month of the Coptic year.
95 * Constant for Επηπ/ﺐﻴﺑأ,
96 * the 11th month of the Coptic year.
101 * Constant for Μεϲωρη/ىﺮﺴﻣ,
102 * the 12th month of the Coptic year.
107 * Constant for Πικογϫι
108 * μαβοτ/ﺮﻴﻐﺼﻟا
109 * ﺮﻬﺸﻟا,
110 * the 13th month of the Coptic year.
116 BCE
, // Before the epoch
117 CE
// After the epoch
121 * Constructs a CopticCalendar based on the current time in the default time zone
122 * with the given locale.
124 * @param aLocale The given locale.
125 * @param success Indicates the status of CopticCalendar object construction.
126 * Returns U_ZERO_ERROR if constructed successfully.
129 CopticCalendar(const Locale
& aLocale
, UErrorCode
& success
);
135 CopticCalendar (const CopticCalendar
& other
);
141 virtual ~CopticCalendar();
144 * Create and return a polymorphic copy of this calendar.
145 * @return return a polymorphic copy of this calendar.
148 virtual Calendar
* clone(void) const;
151 * return the calendar type, "coptic"
152 * @return calendar type
155 const char * getType() const;
158 //-------------------------------------------------------------------------
159 // Calendar framework
160 //-------------------------------------------------------------------------
163 * Return the extended year defined by the current fields.
166 virtual int32_t handleGetExtendedYear();
169 * Compute fields from the JD
172 virtual void handleComputeFields(int32_t julianDay
, UErrorCode
&status
);
175 * Returns the date of the start of the default century
176 * @return start of century - in milliseconds since epoch, 1970
179 virtual UDate
defaultCenturyStart() const;
182 * Returns the year in which the default century begins
185 virtual int32_t defaultCenturyStartYear() const;
188 * Return the date offset from Julian
191 virtual int32_t getJDEpochOffset() const;
196 * Override Calendar Returns a unique class ID POLYMORPHICALLY. Pure virtual
197 * override. This method is to implement a simple version of RTTI, since not all C++
198 * compilers support genuine RTTI. Polymorphic operator==() and clone() methods call
201 * @return The class ID for this object. All objects of a given class have the
202 * same class ID. Objects of other classes have different class IDs.
205 virtual UClassID
getDynamicClassID(void) const;
208 * Return the class ID for this class. This is useful only for comparing to a return
209 * value from getDynamicClassID(). For example:
211 * Base* polymorphic_pointer = createPolymorphicObject();
212 * if (polymorphic_pointer->getDynamicClassID() ==
213 * Derived::getStaticClassID()) ...
215 * @return The class ID for all objects of this class.
218 U_I18N_API
static UClassID U_EXPORT2
getStaticClassID(void);
221 // We do not want to introduce this API in ICU4C.
222 // It was accidentally introduced in ICU4J as a public API.
224 //-------------------------------------------------------------------------
225 // Calendar system Conversion methods...
226 //-------------------------------------------------------------------------
228 * Convert an Coptic year, month, and day to a Julian day.
230 * @param year the extended year
231 * @param month the month
236 static int32_t copticToJD(int32_t year
, int32_t month
, int32_t day
);
242 #endif /* #if !UCONFIG_NO_FORMATTING */
243 #endif /* COPTCCAL_H */