1ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/*
2ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru ********************************************************************************
359d709d503bab6e2b61931737e662dd293b40578ccornelius * Copyright (C) 2003-2013, International Business Machines Corporation
4ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * and others. All Rights Reserved.
5ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru ******************************************************************************
6ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru *
7ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * File ISLAMCAL.H
8ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru *
9ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * Modification History:
10ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru *
11ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru *   Date        Name        Description
12ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru *   10/14/2003  srl         ported from java IslamicCalendar
13ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru *****************************************************************************
14ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru */
15ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
16ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#ifndef ISLAMCAL_H
17ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#define ISLAMCAL_H
18ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
19ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "unicode/utypes.h"
20ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
21ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#if !UCONFIG_NO_FORMATTING
22ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
23ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "unicode/calendar.h"
24ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
25ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruU_NAMESPACE_BEGIN
26ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
27ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/**
28ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * <code>IslamicCalendar</code> is a subclass of <code>Calendar</code>
2985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho * that implements the Islamic civil and religious calendars.  It
30ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * is used as the civil calendar in most of the Arab world and the
31ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * liturgical calendar of the Islamic faith worldwide.  This calendar
32ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * is also known as the "Hijri" calendar, since it starts at the time
33ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * of Mohammed's emigration (or "hijra") to Medinah on Thursday,
34ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * July 15, 622 AD (Julian).
35ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * <p>
36ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * The Islamic calendar is strictly lunar, and thus an Islamic year of twelve
37ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * lunar months does not correspond to the solar year used by most other
38ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * calendar systems, including the Gregorian.  An Islamic year is, on average,
39ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * about 354 days long, so each successive Islamic year starts about 11 days
40ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * earlier in the corresponding Gregorian year.
41ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * <p>
42ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * Each month of the calendar starts when the new moon's crescent is visible
43ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * at sunset.  However, in order to keep the time fields in this class
44ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * synchronized with those of the other calendars and with local clock time,
45ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * we treat days and months as beginning at midnight,
46ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * roughly 6 hours after the corresponding sunset.
47ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * <p>
48ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * There are two main variants of the Islamic calendar in existence.  The first
49ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * is the <em>civil</em> calendar, which uses a fixed cycle of alternating 29-
50ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * and 30-day months, with a leap day added to the last month of 11 out of
51ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * every 30 years.  This calendar is easily calculated and thus predictable in
52ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * advance, so it is used as the civil calendar in a number of Arab countries.
53ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * This is the default behavior of a newly-created <code>IslamicCalendar</code>
54ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * object.
55ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * <p>
56ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * The Islamic <em>religious</em> calendar, however, is based on the <em>observation</em>
57ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * of the crescent moon.  It is thus affected by the position at which the
58ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * observations are made, seasonal variations in the time of sunset, the
59ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * eccentricities of the moon's orbit, and even the weather at the observation
60ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * site.  This makes it impossible to calculate in advance, and it causes the
61ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * start of a month in the religious calendar to differ from the civil calendar
62ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * by up to three days.
63ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * <p>
64ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * Using astronomical calculations for the position of the sun and moon, the
65ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * moon's illumination, and other factors, it is possible to determine the start
66ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * of a lunar month with a fairly high degree of certainty.  However, these
67ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * calculations are extremely complicated and thus slow, so most algorithms,
68ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * including the one used here, are only approximations of the true astronical
69ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * calculations.  At present, the approximations used in this class are fairly
70ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * simplistic; they will be improved in later versions of the code.
71ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * <p>
72ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * The {@link #setCivil setCivil} method determines
73ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * which approach is used to determine the start of a month.  By default, the
74ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * fixed-cycle civil calendar is used.  However, if <code>setCivil(false)</code>
75ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * is called, an approximation of the true lunar calendar will be used.
76ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru *
77ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * @see GregorianCalendar
78ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru *
79ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * @author Laura Werner
80ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * @author Alan Liu
81ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * @author Steven R. Loomis
82ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * @internal
83ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru */
8459d709d503bab6e2b61931737e662dd293b40578ccorneliusclass U_I18N_API IslamicCalendar : public Calendar {
85ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru public:
86ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  //-------------------------------------------------------------------------
87ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  // Constants...
88ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  //-------------------------------------------------------------------------
8959d709d503bab6e2b61931737e662dd293b40578ccornelius
90ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
9159d709d503bab6e2b61931737e662dd293b40578ccornelius   * Calendar type - civil or religious or um alqura
92ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
93ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
9459d709d503bab6e2b61931737e662dd293b40578ccornelius  enum ECalculationType {
95ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    ASTRONOMICAL,
9659d709d503bab6e2b61931737e662dd293b40578ccornelius    CIVIL,
9759d709d503bab6e2b61931737e662dd293b40578ccornelius    UMALQURA,
9859d709d503bab6e2b61931737e662dd293b40578ccornelius    TBLA
99ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  };
100ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
101ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
102ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Constants for the months
103ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
104ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
105ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  enum EMonths {
106ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
107ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Constant for Muharram, the 1st month of the Islamic year.
108ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @internal
109ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
110ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    MUHARRAM = 0,
111ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
112ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
113ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Constant for Safar, the 2nd month of the Islamic year.
114ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @internal
115ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
116ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    SAFAR = 1,
117ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
118ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
119ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Constant for Rabi' al-awwal (or Rabi' I), the 3rd month of the Islamic year.
120ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @internal
121ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
122ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    RABI_1 = 2,
123ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
124ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
125ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Constant for Rabi' al-thani or (Rabi' II), the 4th month of the Islamic year.
126ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @internal
127ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
128ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    RABI_2 = 3,
129ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
130ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
131ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Constant for Jumada al-awwal or (Jumada I), the 5th month of the Islamic year.
132ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @internal
133ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
134ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    JUMADA_1 = 4,
135ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
136ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
137ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Constant for Jumada al-thani or (Jumada II), the 6th month of the Islamic year.
138ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @internal
139ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
140ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    JUMADA_2 = 5,
141ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
142ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
143ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Constant for Rajab, the 7th month of the Islamic year.
144ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @internal
145ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
146ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    RAJAB = 6,
147ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
148ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
149ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Constant for Sha'ban, the 8th month of the Islamic year.
150ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @internal
151ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
152ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    SHABAN = 7,
153ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
154ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
155ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Constant for Ramadan, the 9th month of the Islamic year.
156ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @internal
157ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
158ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    RAMADAN = 8,
159ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
160ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
161ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Constant for Shawwal, the 10th month of the Islamic year.
162ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @internal
163ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
164ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    SHAWWAL = 9,
165ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
166ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
167ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Constant for Dhu al-Qi'dah, the 11th month of the Islamic year.
168ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @internal
169ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
170ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    DHU_AL_QIDAH = 10,
171ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
172ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /**
173ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * Constant for Dhu al-Hijjah, the 12th month of the Islamic year.
174ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     * @internal
175ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru     */
176ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    DHU_AL_HIJJAH = 11,
177ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
178ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    ISLAMIC_MONTH_MAX
179ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  };
180ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
181ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
182ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  //-------------------------------------------------------------------------
183ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  // Constructors...
184ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  //-------------------------------------------------------------------------
185ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
186ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
187ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Constructs an IslamicCalendar based on the current time in the default time zone
188ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * with the given locale.
189ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *
190ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @param aLocale  The given locale.
191ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @param success  Indicates the status of IslamicCalendar object construction.
192ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *                 Returns U_ZERO_ERROR if constructed successfully.
19359d709d503bab6e2b61931737e662dd293b40578ccornelius   * @param type     The Islamic calendar calculation type. The default value is CIVIL.
194ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
195ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
19659d709d503bab6e2b61931737e662dd293b40578ccornelius  IslamicCalendar(const Locale& aLocale, UErrorCode &success, ECalculationType type = CIVIL);
197ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
198ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
199ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Copy Constructor
200ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
201ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
202ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  IslamicCalendar(const IslamicCalendar& other);
203ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
204ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
205ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Destructor.
206ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
207ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
208ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  virtual ~IslamicCalendar();
209ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
210ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
21159d709d503bab6e2b61931737e662dd293b40578ccornelius   * Sets Islamic calendar calculation type used by this instance.
212ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *
21359d709d503bab6e2b61931737e662dd293b40578ccornelius   * @param type    The calendar calculation type, <code>CIVIL</code> to use the civil
21459d709d503bab6e2b61931737e662dd293b40578ccornelius   *                calendar, <code>ASTRONOMICAL</code> to use the astronomical calendar.
215ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
216ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
21759d709d503bab6e2b61931737e662dd293b40578ccornelius  void setCalculationType(ECalculationType type, UErrorCode &status);
218ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
219ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
220ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Returns <code>true</code> if this object is using the fixed-cycle civil
221ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * calendar, or <code>false</code> if using the religious, astronomical
222ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * calendar.
223ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
224ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
225ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  UBool isCivil();
226ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
227ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
228ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  // TODO: copy c'tor, etc
229ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
230ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  // clone
231ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  virtual Calendar* clone() const;
232ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
233ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru private:
234ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
235ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Determine whether a year is a leap year in the Islamic civil calendar
236ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
237ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  static UBool civilLeapYear(int32_t year);
238ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
239ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
240ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Return the day # on which the given year starts.  Days are counted
241ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * from the Hijri epoch, origin 0.
242ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
24359d709d503bab6e2b61931737e662dd293b40578ccornelius  int32_t yearStart(int32_t year) const;
244ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
245ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
246ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Return the day # on which the given month starts.  Days are counted
247ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * from the Hijri epoch, origin 0.
248ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *
249ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @param year  The hijri year
250ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @param year  The hijri month, 0-based
251ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
252ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  int32_t monthStart(int32_t year, int32_t month) const;
253ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
254ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
255ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Find the day number on which a particular month of the true/lunar
256ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Islamic calendar starts.
257ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *
258ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @param month The month in question, origin 0 from the Hijri epoch
259ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *
260ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @return The day number on which the given month starts.
261ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
262ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  int32_t trueMonthStart(int32_t month) const;
263ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
264ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
265ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Return the "age" of the moon at the given time; this is the difference
266ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * in ecliptic latitude between the moon and the sun.  This method simply
267ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * calls CalendarAstronomer.moonAge, converts to degrees,
268ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * and adjusts the resultto be in the range [-180, 180].
269ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *
270ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @param time  The time at which the moon's age is desired,
271ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *              in millis since 1/1/1970.
272ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
27385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho  static double moonAge(UDate time, UErrorCode &status);
274ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
275ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  //-------------------------------------------------------------------------
276ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  // Internal data....
277ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  //
278ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
279ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
280ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * <code>CIVIL</code> if this object uses the fixed-cycle Islamic civil calendar,
281ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * and <code>ASTRONOMICAL</code> if it approximates the true religious calendar using
282ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * astronomical calculations for the time of the new moon.
283ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
28459d709d503bab6e2b61931737e662dd293b40578ccornelius  ECalculationType cType;
285ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
286ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  //----------------------------------------------------------------------
287ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  // Calendar framework
288ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  //----------------------------------------------------------------------
289ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru protected:
290ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
291ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
292ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
293ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const;
294ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
295ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
296ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Return the length (in days) of the given month.
297ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *
298ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @param year  The hijri year
299ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @param year  The hijri month, 0-based
300ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
301ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
302ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const;
303ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
304ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
305ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Return the number of days in the given Islamic year
306ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
307ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
308ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  virtual int32_t handleGetYearLength(int32_t extendedYear) const;
309ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
310ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  //-------------------------------------------------------------------------
311ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  // Functions for converting from field values to milliseconds....
312ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  //-------------------------------------------------------------------------
313ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
314ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  // Return JD of start of given month/year
315ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
316ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
317ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
318ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth) const;
319ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
320ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  //-------------------------------------------------------------------------
321ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  // Functions for converting from milliseconds to field values
322ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  //-------------------------------------------------------------------------
323ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
324ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
325ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
326ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
327ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  virtual int32_t handleGetExtendedYear();
328ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
329ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
330ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Override Calendar to compute several fields specific to the Islamic
331ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * calendar system.  These are:
332ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *
333ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * <ul><li>ERA
334ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * <li>YEAR
335ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * <li>MONTH
336ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * <li>DAY_OF_MONTH
337ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * <li>DAY_OF_YEAR
338ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * <li>EXTENDED_YEAR</ul>
339ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *
340ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * The DAY_OF_WEEK and DOW_LOCAL fields are already set when this
341ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * method is called. The getGregorianXxx() methods return Gregorian
342ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * calendar equivalents for the given Julian day.
343ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
344ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
345ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  virtual void handleComputeFields(int32_t julianDay, UErrorCode &status);
346ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
347ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  // UObject stuff
348ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru public:
349ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
350ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @return   The class ID for this object. All objects of a given class have the
351ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *           same class ID. Objects of other classes have different class IDs.
352ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
353ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
354ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  virtual UClassID getDynamicClassID(void) const;
355ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
356ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
357ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Return the class ID for this class. This is useful only for comparing to a return
358ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * value from getDynamicClassID(). For example:
359ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *
360ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *      Base* polymorphic_pointer = createPolymorphicObject();
361ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *      if (polymorphic_pointer->getDynamicClassID() ==
362ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *          Derived::getStaticClassID()) ...
363ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *
364ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @return   The class ID for all objects of this class.
365ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
366ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
36759d709d503bab6e2b61931737e662dd293b40578ccornelius  /*U_I18N_API*/ static UClassID U_EXPORT2 getStaticClassID(void);
368ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
369ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
370ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * return the calendar type, "buddhist".
371ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *
372ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @return calendar type
373ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
374ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
375ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  virtual const char * getType() const;
376ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
377ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru private:
378ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  IslamicCalendar(); // default constructor not implemented
379ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
380ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  // Default century.
381ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru protected:
382ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
383ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
384ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * (Overrides Calendar) Return true if the current date for this Calendar is in
385ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Daylight Savings Time. Recognizes DST_OFFSET, if it is set.
386ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *
387ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @param status Fill-in parameter which receives the status of this operation.
388ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @return   True if the current date for this Calendar is in Daylight Savings Time,
389ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   *           false, otherwise.
390ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
391ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
392ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  virtual UBool inDaylightTime(UErrorCode& status) const;
393ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
394ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
395ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
396ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Returns TRUE because the Islamic Calendar does have a default century
397ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
398ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
399ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  virtual UBool haveDefaultCentury() const;
400ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
401ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
402ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Returns the date of the start of the default century
403ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @return start of century - in milliseconds since epoch, 1970
404ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
405ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
406ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  virtual UDate defaultCenturyStart() const;
407ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
408ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
409ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Returns the year in which the default century begins
410ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * @internal
411ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
412ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  virtual int32_t defaultCenturyStartYear() const;
413ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
41459d709d503bab6e2b61931737e662dd293b40578ccornelius private:
415ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  /**
416ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * Initializes the 100-year window that dates with 2-digit years
417ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * are considered to fall within so that its start date is 80 years
418ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   * before the current time.
419ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru   */
420ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru  static void  initializeSystemDefaultCentury(void);
421ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru};
422ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
423ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruU_NAMESPACE_END
424ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
425ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#endif
426ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#endif
427ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
428ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
429ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
430