Move system-server under server/system.
[platform/framework/native/appfw.git] / inc / FLclGregorianCalendar.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file                FLclGregorianCalendar.h
19  * @brief               This is the header file for the %GregorianCalendar class.
20  *
21  * This header file contains the declarations of the %GregorianCalendar class.
22  */
23 #ifndef _FLCL_GREGORIAN_CALENDAR_H_
24 #define _FLCL_GREGORIAN_CALENDAR_H_
25
26 #include <FBase.h>
27
28 #include <FLclCalendar.h>
29 #include <FLclLocale.h>
30 #include <FLclTimeZone.h>
31
32 namespace Tizen { namespace Locales
33 {
34
35 /**
36  * @class               GregorianCalendar
37  * @brief               This class is a concrete subclass of calendar and provides the Gregorian calendar that is the most commonly used standard calendar.
38  *
39  * @since               2.0
40  *
41  * @final       This class is not intended for extension.
42  *
43  * The %GregorianCalendar class is a concrete subclass of calendar and provides the Gregorian calendar that is the most commonly used standard calendar.
44  *
45  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/locales/gregorian_calendar.htm">Gregorian Calendar</a>.
46  *
47  * @see Tizen::Locales::Locale
48  * @see Tizen::Locales::TimeZone
49  *
50  * The following example demonstrates how to use the %GregorianCalendar class.
51  * @code
52  #include <FBase.h>
53  #include <FLocales.h>
54
55  using namespace Tizen::Base;
56  using namespace Tizen::Locales;
57
58  void
59  MyClass::GregorianCalendarExample(void)
60  {
61         Calendar* pGregorianCalendar = Calendar::CreateInstanceN(CALENDAR_GREGORIAN);
62
63         pGregorianCalendar->SetTimeField(TIME_FIELD_YEAR, 2005);
64         pGregorianCalendar->SetTimeField(TIME_FIELD_MONTH, JANUARY);
65         pGregorianCalendar->SetTimeField(TIME_FIELD_DAY_OF_MONTH, 3);
66
67         int dayOfWeek = pGregorianCalendar->GetTimeField(TIME_FIELD_DAY_OF_WEEK);// It is Monday.
68
69         pGregorianCalendar->Clear();
70         pGregorianCalendar->SetTimeField(TIME_FIELD_YEAR, 1972);
71         pGregorianCalendar->SetTimeField(TIME_FIELD_MONTH, OCTOBER);
72         pGregorianCalendar->SetTimeField(TIME_FIELD_DAY_OF_MONTH, 26); // It is Thursday
73
74         pGregorianCalendar->AddTimeField(TIME_FIELD_DAY_OF_MONTH, 1);
75         dayOfWeek = pGregorianCalendar->GetTimeField(TIME_FIELD_DAY_OF_WEEK); // It is Friday.
76 }
77  @endcode
78  *
79  */
80
81 class _OSP_EXPORT_ GregorianCalendar
82         : public Calendar
83 {
84 public:
85         /**
86          * This is the default constructor for this class. @n
87          * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
88          *
89          * @since                       2.0
90          *
91          * @see                         Construct()
92          */
93         GregorianCalendar(void);
94
95
96         /**
97          * This is the destructor for this class. @n
98          * This destructor overrides Tizen::Locales::Calendar::~Calendar().
99          *
100          * @since                       2.0
101          */
102         virtual ~GregorianCalendar(void);
103
104
105         /**
106          * Initializes this instance of %GregorianCalendar with the current GMT time zone and the system locale.
107          * The time zone is used for the zone offset and the DST offset.
108          * An instance has weekdata which are the first of week, minimal days in the first week, weekend on set and weekend cease.
109          * The weekdata are set as default values by the locale.
110          *
111          * @since                       2.0
112          *
113          * @return                      An error code
114          * @exception           E_SUCCESS                                       The method is successful.
115          * @exception           E_OUT_OF_MEMORY                         The memory is insufficient.
116          */
117         result Construct(void);
118
119
120         /**
121          * Initializes this instance of %GregorianCalendar with the specified parameter.
122          *
123          * @since                       2.0
124          *
125          * @return                      An error code
126          * @param[in]           gc                                                      An instance of %GregorianCalendar to copy
127          * @exception           E_SUCCESS                                       The method is successful.
128          * @exception           E_OUT_OF_MEMORY                         The memory is insufficient.
129          */
130         result Construct(const GregorianCalendar& gc);
131
132
133         /**
134          * Initializes this instance of %GregorianCalendar based on the current time in the specified time zone with the system locale. @n 
135          * The @c timeZone is used for the zone offset and the DST offset.
136          * An instance has weekdata which are the first of week, minimal days in the first week, weekend on set, and weekend cease.
137          * The weekdata are set as default values by the locale. 
138          *
139          * @since                       2.0
140          *
141          * @return                      An error code
142          * @param[in]           timeZone                                        An instance of TimeZone
143          * @exception           E_SUCCESS                                       The method is successful.
144          * @exception           E_OUT_OF_MEMORY                         The memory is insufficient.
145          */
146         result Construct(const TimeZone& timeZone);
147
148
149         /**
150          * Initializes this instance of %GregorianCalendar based on the current time in the GMT time zone with the specified @c locale.
151          * The time zone is used for the zone offset and the DST offset.
152          * An instance has weekdata which are the first of week, minimal days in the first week, weekend on set, and weekend cease.
153          * The weekdata are set as default values by the specified @c locale.
154          *
155          * @if OSPCOMPAT 
156          * @brief <i> [Compatibility] </i>
157          * @endif 
158          * @since                       2.0
159          * @if OSPCOMPAT
160          * @compatibility     This method has compatibility issues with OSP compatible applications. @n
161          *                              For more information, see @ref CompGregorianCalendarConstructPage "here".   
162          * @endif
163          *
164          * @return                      An error code
165          * @param[in]           locale                                          An instance of Locale
166          * @exception           E_SUCCESS                                       The method is successful.
167          * @exception           E_OUT_OF_MEMORY                         The memory is insufficient.
168          * @exception                            E_INVALID_ARG           The specified @c locale is invalid. 
169          */
170         result Construct(const Locale& locale);
171
172
173         /**
174          * Initializes this instance of %GregorianCalendar based on the current time in the specified time zone with the specified system locale. @n
175          * The @c timeZone is used for the zone offset and the DST offset.
176          * An instance has weekdata which are the first of week, minimal days in the first week, weekend on set, and weekend cease.
177          * The weekdata are set as default values by the specified @c locale.
178          *
179          * @if OSPCOMPAT
180          * @brief <i> [Compatibility] </i>
181          * @endif
182          * @since                       2.0
183          * @if OSPCOMPAT
184          * @compatibility     This method has compatibility issues with OSP compatible applications. @n
185          *                              For more information, see @ref CompGregorianCalendarConstructPage "here".   
186          * @endif
187          *
188          * @return                      An error code
189          * @param[in]           timeZone                                        An instance of TimeZone
190          * @param[in]           locale                                          An instance of Locale
191          * @exception           E_SUCCESS                                       The method is successful.
192          * @exception           E_OUT_OF_MEMORY                         The memory is insufficient.
193          * @exception                            E_INVALID_ARG           The specified @c locale is invalid. 
194          */
195         result Construct(const TimeZone& timeZone, const Locale& locale);
196
197         /**
198          * @if OSPCOMPAT
199          * @page                    CompGregorianCalendarConstructPage Compatibility for Construct()
200          * @section                   CompGregorianCalendarConstructIssueSection Issues
201          * Implementation of this method in OSP compatible applications has the following issue: @n
202          * -# The method returns E_UNSUPPORTED_OPERATION if the @c locale is invalid.
203          *
204          * @section                 CompGregorianCalendarConstructSolutionSection Resolutions
205          * This issue has been resolved in Tizen.
206          * @par When working in Tizen:
207          * -# The method returns E_INVALID_ARG if the @c locale is invalid.
208          * @endif
209         */
210
211         /**
212          * Initializes this instance of %GregorianCalendar based on the specified @c year, @c month, @c day, @c hour, @c minute, and @c second
213          * in the GMT time zone with the system locale. @n
214          * The time zone is used for the zone offset and the DST offset.
215          * An instance has weekdata which are the first of week, minimal days in the first week, weekend on set, and weekend cease.
216          * The weekdata are set as default values by the locale.
217          * The Gregorian calendar is lenient: time fields are normalized when the user calls the Calendar::GetTimeField() method.
218          *
219          * @since                       2.0
220          *
221          * @return                      An error code
222          * @param[in]           year                                            An integer value used to set the year time field
223          * @param[in]           month                                           An integer value used to set the month time field @n
224          *                                                                                              The indexing is 1-based. Therefore, 1 means January.
225          * @param[in]           day                                                     An integer value used to set the date time field
226          * @param[in]           hour                                            An integer value used to set the hour time field
227          * @param[in]           minute                                          An integer value used to set the minute time field
228          * @param[in]           second                                          An integer value used to set the second time field
229          * @exception           E_SUCCESS                                       The method is successful.
230          * @exception           E_INVALID_ARG           An argument is invalid.
231          * @exception           E_OUT_OF_MEMORY                         The memory is insufficient.
232          * @exception           E_OUT_OF_RANGE                          In this method, time fields of this instance are calculated. @n
233          *                                                If the value of the time fields goes out of range, this exception is returned.
234          */
235         result Construct(int year, int month, int day, int hour = 0, int minute = 0, int second = 0);
236
237
238         /**
239          * Initializes this instance of %GregorianCalendar based on the specified date and time in the GMT time zone with the system locale. @n
240          * The time zone is used for the zone offset and the DST offset.
241          * An instance has weekdata which are the first of week, minimal days in the first week, weekend on set, and weekend cease.
242          * The weekdata are set as default values by the locale.
243          *
244          * @since                       2.0
245          *
246          * @return                      An error code
247          * @param[in]           dateTime                                        An instance of Tizen::Base::DateTime
248          * @exception           E_SUCCESS                                       The method is successful.
249          * @exception           E_OUT_OF_MEMORY                         The memory is insufficient.
250          * @exception           E_INVALID_ARG           The specified @c dateTime is invalid.
251          * @exception           E_OUT_OF_RANGE                          In this method, time fields of this instance are calculated. @n
252          *                                                If the value of the time fields goes out of range, this exception is returned.
253          */
254         result Construct(const Tizen::Base::DateTime& dateTime);
255
256
257         /**
258          * Adds the specified amount to the specified time field, based on the calendar rules. @n
259          * It is equivalent to calling Set(field, GetTimeField(field)+amount) with two adjustments. @n
260          *
261          * @b Add @b Rule1: The value of @c field after the call minus the value of @c field before the call is delta, modulo any overflow that has occurred in @c field.
262          * Overflow occurs when the @c field value exceeds its range and, as a result, the next larger field is incremented or decremented and the @c field value is adjusted back into its range. @n
263          *
264          * @b Add @b Rule2: If a smaller field is expected to be invariant, but it is impossible for it to be equal to its prior value because of
265          * changes in its minimum or maximum value after the @c field value is changed, then its value is adjusted to the closest possible value. @n
266          *
267          * A smaller field represents a smaller unit of time. The TIME_FIELD_HOUR field is smaller than the TIME_FIELD_DAY_OF_MONTH field.
268          * No adjustment is made to smaller fields that are not expected to be invariant.
269          * The calendar system determines what fields are expected to be invariant. @n
270          *
271          * In addition, this method forces re-computation of the calendar's milliseconds and all time fields immediately.
272          * @n
273          * For example, consider a %GregorianCalendar set to Oct. 31. 2004. Calling AddTimeField(TIME_FIELD_MONTH, 13) sets the calendar to Nov. 30. 2005.
274          * The TIME_FIELD_MONTH field is set to TIME_FIELD_NOVEMBER by @b Rule1, since adding 13 months to October gives November of the next year. Since
275          * the TIME_FIELD_DAY_OF_MONTH cannot be 31 in November in a %GregorianCalendar, TIME_FIELD_DAY_OF_MONTH is set to 30 by @b Rule2.
276          *
277          * @since                       2.0
278          *
279          * @return                      An error code
280          * @param[in]           field                                           The time field
281          * @param[in]           amount                                          The amount to add
282          * @exception           E_SUCCESS                                       The method is successful.
283          * @exception           E_INVALID_ARG                           The specified @c field is invalid.
284          * @exception           E_OUT_OF_RANGE          In this method, time fields of this instance are calculated. @n
285          *                                                                              If the value of the time fields goes out of range, this exception is returned. 
286          * @remarks                     The TIME_FIELD_EXTENDED_YEAR and TIME_FIELD_YEAR_WOY fields cannot be added.
287          */
288         virtual result AddTimeField(TimeField field, int amount);
289
290
291         /**
292          * Gets the actual minimum value that the specified time field can have, given the current date. @n
293          * For the Gregorian calendar, this is the same as Calendar::GetMinTimeField() and Calendar::GetGreatestMinTimeField().
294          *
295          * @since                       2.0
296          *
297          * @return                      An integer value indicating the actual minimum value
298          * @param[in]                           field           The time field
299          * @exception                           E_SUCCESS                       The method is successful.
300          * @exception                           E_INVALID_ARG                   The specified time field is invalid.
301          * @remarks                                     The specific error code can be accessed using the GetLastResult() method.
302          */
303         virtual int GetActualMinTimeField(TimeField field) const;
304
305
306         /**
307          * Gets the actual maximum value that the specified time field can have, given the current date. @n
308          * For example, if the current date is "Feb. 3. 2004", then the maximum value of the DATE field is 29.
309          *
310          * @since                       2.0
311          *
312          * @return                      An integer value indicating the actual maximum value
313          * @param[in]                           field           The time field
314          * @exception                           E_SUCCESS                       The method is successful.
315          * @exception                           E_INVALID_ARG                   The specified time field is invalid.
316
317          * @remarks                                     The specific error code can be accessed using the GetLastResult() method.
318          */
319         virtual int GetActualMaxTimeField(TimeField field) const;
320
321
322         /*
323          * Gets the Gregorian Calendar change date. @n
324          * This is the point when the switch from Julian dates to Gregorian dates occurred.
325          * Default is 00:00:00 local time, October 15, 1582. Previous to this the time and date are Julian dates.
326          *
327          * @since                       2.0
328          *
329          * @return                      The milliseconds which is the Gregorian cutover time for this calendar
330          */
331         long long GetGregorianChange(void) const;
332
333
334         /**
335          * Gets the calendar type of the current instance.
336          *
337          * @since                       2.0
338          *
339          * @return                      An instance of CalendarType representing the calendar type of the current instance of Calendar @n
340          *                                      In this case, CALENDAR_GREGORIAN.
341          */
342         virtual CalendarType GetType(void) const;
343
344         /**
345          * Checks whether the current date for the current instance is in Daylight Saving Time (DST).
346          *
347          * @since                       2.0
348          *
349          * @return                      An error code
350          * @param[out]          isInDst                                         Set to @c true if the current date is in DST, @n
351          *                                                                                              else @c false
352          * @exception           E_SUCCESS                                       The method is successful.
353          * @exception           E_OUT_OF_RANGE          In this method, time fields of this instance are calculated. @n
354          *                                                                              If the value of the time fields goes out of range, this exception is returned.
355          * @exception           E_INVALID_STATE         In this method, time fields of this instance are calculated. @n 
356          *                     If any time field value previously set is invalid, this exception is returned.
357          */
358         virtual result IsInDst(bool& isInDst) const;
359
360
361         /**
362          * Checks whether the specified year is a leap year.
363          *
364          * @since                       2.0
365          *
366          * @return                      @c true if the specified year is a leap year, @n
367          *                                      else @c false
368          * @param[in]           year                                            The year to check
369          */
370         bool IsLeapYear(int year) const;
371
372
373         /*
374          * Sets the Gregorian Calendar change date. @n
375          * This is the point when the switch from Julian dates to Gregorian dates occurred.
376          * Default is 00:00:00 local time, Oct 15, 1582. Previous to this, dates are in the Julian calendar.
377          *
378          * To obtain a pure Julian calendar, set the change @c change to MAX_MILLISECOND.
379          * To obtain a pure Gregorian calendar, set the change @c change to MIN_MILLISECOND.
380          *
381          * @since                       2.0
382          *
383          * @return                      An error code
384          * @param[in]           change                                          The given Gregorian cutover date
385          * @exception           E_SUCCESS                                       The method is successful.
386          * @exception           E_OUT_OF_MEMORY                         The memory is insufficient.
387          */
388         result SetGregorianChange(long long change);
389
390         /**
391          * Rolls up or down as per the specified amount in the specified field. @n
392          * This method overrides Calendar(). @n
393          * For more details, refer to Tizen::Locales::Calendar::Roll(TimeField, int).
394          *
395          * @since                       2.0
396          *
397          * @return                      An error code
398          * @param[in]           field                                           The time field
399          * @param[in]           amount                                          The amount to roll up/down
400          * @exception           E_SUCCESS                                       The method is successful.
401          * @exception           E_INVALID_STATE                         In this method, time fields of this instance are calculated. @n
402          *                                                                      If any time field value previously set is invalid, this exception is returned.
403          * @exception           E_INVALID_ARG                           The specified @c field is invalid (for example, TIME_FIELD_DST_OFFSET, TIME_FIELD_ZONE_OFFSET).
404          * @exception           E_OUT_OF_RANGE                  In this method, time fields of this instance are calculated. @n
405          *                                               If the value of the time fields goes out of range, this exception is returned.
406          */
407         virtual result Roll(TimeField field, int amount);
408
409
410         /*
411          * Gets the millisecond which is midnight, local time at or before the Gregorian cutover.
412          *
413          * @since                       2.0
414          *
415          * @return                      The millisecond which is midnight, local time at or before the Gregorian cutover
416          *                                      If this method fails, @c -1 is returned.
417          *                                      The specific error code can be accessed using the GetLastResult() method.
418          */
419         long long GetNormalizedGregorianCutover(void) const;
420
421         /*
422          * Gets the year of the Gregorian cutover, with @c 0 representing 1 BC, @c -1 representing 2 BC, and so on.
423          *
424          * @since                       2.0
425          *
426          * @return                      The year of the Gregorian cutover
427          *                                      If this method fails, @c -1 is returned.
428          *                                      The specific error code can be accessed using the GetLastResult() method.
429          */
430         int GetGregorianCutoverYear(void) const;
431
432         /*
433          * Gets the Julian day number of the Gregorian cutover.
434          *
435          * @since                       2.0
436          *
437          * @return                      The Julian day number of the Gregorian cutover
438          */
439         int GetCutoverJulianDay(void) const;
440
441
442         /*
443          * Checks whether the current calendar is a Gregorian calendar or not.
444          *
445          * @since                       2.0
446          *
447          * @return                      @c true if the current calendar is a Gregorian calendar, @n
448          *                                      else @c false
449          */
450         bool IsGregorian() const;
451
452
453         /**
454          * Gets the current time of the instance in milliseconds from epoch.
455          *
456          * @since                       2.0
457          *
458          * @return                      An error code
459          * @param[out]          millisec                                        The current time in milliseconds from the epoch
460          * @exception           E_SUCCESS                                       The method is successful.
461          * @exception           E_INVALID_STATE                         If any time field value previously set is invalid, this exception is returned.
462          * @exception           E_OUT_OF_RANGE                          A time field or its value is out of range.
463          */
464         result GetTimeInMillisecFromEpoch(long long& millisec) const;
465
466
467         /**
468          * Sets the current time of the instance with the specified milliseconds value.
469          *
470          * @since                       2.0
471          *
472          * @return                      An error code
473          * @param[in]           millisec                                        The new time in milliseconds from the epoch
474          * @exception           E_OUT_OF_RANGE                          A time field or its value is out of range.
475          */
476         result SetTimeInMillisecFromEpoch(long long millisec);
477
478
479         /**
480          * Converts the 1970-epoch day number to the Gregorian year, month, date, day of week, and day of year.
481          *
482          * @since                       2.0
483          *
484          * @param[in]           day                                                     The 1970-epoch day number
485          * @param[out]          year                                            The year to convert
486          * @param[out]          month                                           The month to convert
487          * @param[out]          dayOfMonth                                      The date to convert
488          * @param[out]          dayOfWeek                                       The day of week to convert
489          * @param[out]          dayOfYear                                       The day of year to convert
490          */
491         static void DayToFields(int day, int& year, int& month, int& dayOfMonth, int& dayOfWeek, int& dayOfYear);
492
493 private:
494         /*
495          * @enum                GregorianCalendarEras
496          *
497          * Defines Era for Gregorian calendar. The indexing is 0-based.
498          */
499         enum GregorianCalendarEras
500         {
501                 GREGORIAN_CALENDAR_BC = 0,      // BC
502                 GREGORIAN_CALENDAR_AD = 1,      // AD
503
504                 GREGORIAN_CALENDAR_BCE = 0,     // BCE
505                 GREGORIAN_CALENDAR_CE = 1,      // CE
506         };
507
508         /*
509          * The implementation of this copy constructor is intentionally blank and declared as private to
510          * prohibit copying of objects.
511          */
512         GregorianCalendar(const GregorianCalendar& gregorianCalendar);
513
514         /*
515          * The implementation of this copy assignment operator is intentionally blank and declared as private
516          * to prohibit copying of objects.
517          */
518         GregorianCalendar& operator =(const GregorianCalendar& gregorianCalendar);
519
520         // added for backward compatibility
521         virtual result RollWithSingleUnit(TimeField field, bool up);
522         virtual result ComputeTimeFields(void);
523         virtual result ComputeTime(void);
524         virtual int GetMonthLength(int extendedYear, int month) const;
525         virtual int HandleGetLimit(TimeField field, CalendarLimitType limitType) const;
526         virtual Calendar* CloneN(void) const;
527
528 public:
529         /*
530          * Defines the length of months.
531          *
532          * @since 2.0
533          */
534         static const int MONTH_LENGTH[24];
535
536         /*
537          * Defines the days of a year.
538          *
539          * @since 2.0
540          */
541         static const int NUM_DAYS[24];
542
543         /*
544          * The Gregorian cutover number for Julian day.
545          *
546          * @since 2.0
547          */
548         static const int CUTOVER_JULIAN_DAY = 2299161;      // Oct 15, 1582
549
550         /*
551          * The epoch year.
552          *
553          * @since 2.0
554          */
555         static const int EPOCH_YEAR = 1970;
556
557         /*
558          * The epoch start for Julian day.
559          *
560          * @since 2.0
561          */
562         static const int EPOCH_START_AS_JULIAN_DAY = 2440588; // Jan 1, 1970(Gregorian)
563
564         /*
565          * Jan 1, 1 epoch start for Julian day.
566          *
567          * @since 2.0
568          */
569         static const int JAN_1_1_JULIAN_DAY = 1721426;  // Jan 1, 1 CE Gregorian
570
571         /*
572          * Temporary value for the Gregorian cutover.
573          *
574          * @since 2.0
575          */
576         static const long long PAPAL_CUTOVER =
577                 ((long long) (GregorianCalendar::CUTOVER_JULIAN_DAY -
578                                           GregorianCalendar::EPOCH_START_AS_JULIAN_DAY) * (long long) ONE_DAY_IN_MILLISEC);
579
580         /*
581          * Maximum value for longlong.
582          *
583          * @since 2.0
584          */
585         static const long long MAX_LONGLONG = (2 ^ 63) - 1;
586
587         /*
588          * Minimum value for longlong.
589          *
590          * @since 2.0
591          */
592         static const long long MIN_LONGLONG = -1 * (2 ^ 63);
593
594         /*
595          * Maximum value for Julian day.
596          *
597          * @since 2.0
598          */
599         static const int MAX_JULIAN = 0x7F000000;
600
601         /*
602          * Minimum value for Julian day.
603          *
604          * @since 2.0
605          */
606         static const int MIN_JULIAN = -0x7F000000;
607
608         /*
609          * Maximum millisecond value for Julian day.
610          *
611          * @since 2.0
612          */
613         static const long long MAX_MILLISEC = ((GregorianCalendar::MAX_JULIAN - GregorianCalendar::EPOCH_START_AS_JULIAN_DAY) * (long long) ONE_DAY_IN_MILLISEC);
614
615         /*
616          * Minimum millisecond value for Julian day.
617          *
618          * @since 2.0
619          */
620         static const long long MIN_MILLISEC = ((GregorianCalendar::MIN_JULIAN - GregorianCalendar::EPOCH_START_AS_JULIAN_DAY) * (long long) ONE_DAY_IN_MILLISEC);
621
622         /*
623          * Epoch offset in millisecond value.
624          *
625          * @since 2.0
626          */
627         static const long long EPOCH_OFFSET_IN_MILLISEC = 62135596800000LL; // Jan 1, 1970
628
629         /*
630          * Default Gregorian cutover.
631          *
632          * @since 2.0
633          */
634         static const long long DEFAULT_GREGORIAN_CUTOVER = -12219292800000LL;
635
636 private:
637         long long __normalizedGregorianCutover; // = __gregorianCutover;
638         int __gregorianCutoverYear; // 1582
639         int __cutoverJulianDay;
640
641         friend class _GregorianCalendarImpl;
642         class _GregorianCalendarImpl* __pGregorianCalendarImpl;
643
644 }; // GregorianCalendar
645
646 }} // Tizen::Locales
647
648 #endif //_FLCL_GREGORIAN_CALENDAR_H_