Merge "Update deprecated libprivilege-control API functions." into tizen
[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 
38  *                              standard calendar.
39  *
40  * @since               2.0
41  *
42  * @final               This class is not intended for extension.
43  *
44  * The %GregorianCalendar class is a concrete subclass of calendar and provides the Gregorian calendar that is the most commonly used standard calendar.
45  *
46  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/locales/gregorian_calendar.htm">Gregorian Calendar</a>.
47  *
48  * @see Tizen::Locales::Locale
49  * @see Tizen::Locales::TimeZone
50  *
51  * The following example demonstrates how to use the %GregorianCalendar class.
52  * @code
53  #include <FBase.h>
54  #include <FLocales.h>
55
56  using namespace Tizen::Base;
57  using namespace Tizen::Locales;
58
59  void
60  MyClass::GregorianCalendarExample(void)
61  {
62         Calendar* pGregorianCalendar = Calendar::CreateInstanceN(CALENDAR_GREGORIAN);
63
64         pGregorianCalendar->SetTimeField(TIME_FIELD_YEAR, 2005);
65         pGregorianCalendar->SetTimeField(TIME_FIELD_MONTH, JANUARY);
66         pGregorianCalendar->SetTimeField(TIME_FIELD_DAY_OF_MONTH, 3);
67
68         int dayOfWeek = pGregorianCalendar->GetTimeField(TIME_FIELD_DAY_OF_WEEK);// It is Monday.
69
70         pGregorianCalendar->Clear();
71         pGregorianCalendar->SetTimeField(TIME_FIELD_YEAR, 1972);
72         pGregorianCalendar->SetTimeField(TIME_FIELD_MONTH, OCTOBER);
73         pGregorianCalendar->SetTimeField(TIME_FIELD_DAY_OF_MONTH, 26); // It is Thursday
74
75         pGregorianCalendar->AddTimeField(TIME_FIELD_DAY_OF_MONTH, 1);
76         dayOfWeek = pGregorianCalendar->GetTimeField(TIME_FIELD_DAY_OF_WEEK); // It is Friday.
77 }
78  @endcode
79  *
80  */
81
82 class _OSP_EXPORT_ GregorianCalendar
83         : public Calendar
84 {
85 public:
86         /**
87          * This is the default constructor for this class. @n
88          * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must 
89          * be called right after calling this constructor.
90          *
91          * @since                       2.0
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. @n
107         * The time zone is used for the zone offset and the DST offset.
108         * An instance has weekdata which is the first of week, minimal days in the first week, weekend on set and weekend cease.
109         * The weekdata is set to 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 is the first of week, minimal days in the first week, weekend on set, and weekend cease.
137          * The weekdata is set to 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 is the first of week, minimal days in the first week, weekend on set, and weekend cease.
153          * The weekdata is set to 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 is the first of week, minimal days in the first week, weekend on set, and weekend cease.
177          * The weekdata is set to 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 @c 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 @c 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 is the first of week, minimal days in the first week, weekend on set, and weekend cease.
216          * The weekdata is set to 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                                            The year value
223          * @param[in]           month                                           The month value @n
224          *                                                                                              The indexing is 1-based. Therefore, 1 means January.
225          * @param[in]           day                                                     The date value
226          * @param[in]           hour                                            The hour value
227          * @param[in]           minute                                          The minute value
228          * @param[in]           second                                          The second value
229          * @exception           E_SUCCESS                                       The method is successful.
230          * @exception           E_INVALID_ARG                           A specified argument is invalid.
231          * @exception           E_OUT_OF_MEMORY                         The memory is insufficient.
232          * @exception           E_OUT_OF_RANGE                          In this method, the time fields of this instance are calculated. @n
233          *                                                                                              If the value of the time fields go 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 is the first of week, minimal days in the first week, weekend on set, and weekend cease.
242          * The weekdata is set to 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, the time fields of this instance are calculated. @n
252          *                                                                                              If the value of the time fields go 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 the following 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 
262          * overflow that has occurred in @c field. Overflow occurs when the @c field value exceeds its range and, as a result, 
263          * the next larger field is incremented or decremented and the @c field value is adjusted back into its range. @n
264          *
265          * @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 
266          * value because of changes in its minimum or maximum value after the @c field value is changed, then its value is adjusted 
267          * to the closest possible value. @n
268          *
269          * A smaller field represents a smaller unit of time. The @c TIME_FIELD_HOUR field is smaller than the @c TIME_FIELD_DAY_OF_MONTH field.
270          * No adjustment is made to smaller fields that are not expected to be invariant.
271          * The calendar system determines what fields are expected to be invariant. @n
272          *
273          * In addition, this method forces re-computation of the calendar's milliseconds and all the time fields immediately.
274          * @n
275          * For example, consider a %GregorianCalendar set to Oct. 31. 2004. Calling AddTimeField(@c TIME_FIELD_MONTH, 13) sets the calendar to Nov. 30. 2005.
276          * The @c TIME_FIELD_MONTH field is set to @c TIME_FIELD_NOVEMBER by @b Rule1, since adding 13 months to October gives the month 
277          * value as November of the next year. Since the @c TIME_FIELD_DAY_OF_MONTH cannot be 31 in November in a %GregorianCalendar, 
278          * @c TIME_FIELD_DAY_OF_MONTH is set to 30 by @b Rule2.
279          *
280          * @since                       2.0
281          *
282          * @return                      An error code
283          * @param[in]           field                                   The time field
284          * @param[in]           amount                                  The amount to add
285          * @exception           E_SUCCESS                               The method is successful.
286          * @exception           E_INVALID_ARG                   The specified @c field is invalid.
287          * @exception           E_OUT_OF_RANGE                  In this method, the time fields of this instance are calculated. @n
288          *                                                                                      If the value of the time fields go out of range, this exception is returned.
289          * @remarks                     The @c TIME_FIELD_EXTENDED_YEAR and @c TIME_FIELD_YEAR_WOY fields cannot be added.
290          */
291         virtual result AddTimeField(TimeField field, int amount);
292
293
294         /**
295          * Gets the actual minimum value that the specified time field can have, given the current date. @n
296          * For the Gregorian calendar, this is the same as Calendar::GetMinTimeField() and Calendar::GetGreatestMinTimeField().
297          *
298          * @since                       2.0
299          *
300          * @return                      An integer value indicating the actual minimum value
301          * @param[in]           field                   The time field
302          * @exception           E_SUCCESS               The method is successful.
303          * @exception           E_INVALID_ARG   The specified time field is invalid.
304          * @remarks                     The specific error code can be accessed using the GetLastResult() method.
305          */
306         virtual int GetActualMinTimeField(TimeField field) const;
307
308
309         /**
310          * Gets the actual maximum value that the specified time field can have, given the current date. @n
311          * For example, if the current date is "Feb. 3. 2004", then the maximum value of the DATE field is 29.
312          *
313          * @since                       2.0
314          *
315          * @return                      An integer value indicating the actual maximum value
316          * @param[in]           field                   The time field
317          * @exception           E_SUCCESS               The method is successful.
318          * @exception           E_INVALID_ARG   The specified time field is invalid.
319          * @remarks                     The specific error code can be accessed using the GetLastResult() method.
320          */
321         virtual int GetActualMaxTimeField(TimeField field) const;
322
323
324         /**
325          * Gets the Gregorian Calendar change date. @n
326          * This is the point when the switch from Julian dates to Gregorian dates occurred.
327          * Default is 00:00:00 local time, October 15, 1582. Previous to this, the time and date are Julian dates.
328          *
329          * @since                       2.0
330          *
331          * @return                      The Gregorian cutover time for this calendar in milliseconds
332          */
333         long long GetGregorianChange(void) const;
334
335
336         /**
337          * Gets the calendar type of the current instance.
338          *
339          * @since                       2.0
340          *
341          * @return                      An instance of CalendarType representing the calendar type of the current instance of Calendar @n
342          *                                      In this case, @c CALENDAR_GREGORIAN.
343          */
344         virtual CalendarType GetType(void) const;
345
346         /**
347          * Checks whether the current date for the current instance is in Daylight Saving Time (DST).
348          *
349          * @since                       2.0
350          *
351          * @return                      An error code
352          * @param[out]          isInDst                                         Set to @c true if the current date is in DST, @n
353          *                                                                                              else @c false
354          * @exception           E_SUCCESS                                       The method is successful.
355          * @exception           E_OUT_OF_RANGE                          In this method, time fields of this instance are calculated. @n
356          *                                                                                              If the value of the time fields go out of range, this exception is returned.
357          * @exception           E_INVALID_STATE                         In this method, time fields of this instance are calculated. @n
358          *                                                                                              If any time field value previously set is invalid, this exception is returned.
359          */
360         virtual result IsInDst(bool& isInDst) const;
361
362
363         /**
364          * Checks whether the specified year is a leap year.
365          *
366          * @since                       2.0
367          *
368          * @return                      @c true if the specified year is a leap year, @n
369          *                                      else @c false
370          * @param[in]           year                                            The year to check
371          */
372         bool IsLeapYear(int year) const;
373
374
375         /**
376          * Sets the Gregorian Calendar change date. @n
377          * This is the point when the switch from Julian dates to Gregorian dates occurred.
378          * Default is 00:00:00 local time, Oct 15, 1582. Previous to this, dates are in the Julian calendar.
379          *
380          * To obtain a pure Julian calendar, set @c change to @c MAX_MILLISECOND.
381          * To obtain a pure Gregorian calendar, set @c change to @c MIN_MILLISECOND.
382          *
383          * @since                       2.0
384          *
385          * @return                      An error code
386          * @param[in]           change                                          The Gregorian cutover date
387          * @exception           E_SUCCESS                                       The method is successful.
388          * @exception           E_OUT_OF_MEMORY                         The memory is insufficient.
389          */
390         result SetGregorianChange(long long change);
391
392         /**
393          * Rolls up or down as per the specified amount in the specified field. @n
394          * This method overrides Calendar().Roll(TimeField, int). @n
395          * For more details, refer to Tizen::Locales::Calendar::Roll(TimeField, int).
396          *
397          * @since                       2.0
398          *
399          * @return                      An error code
400          * @param[in]           field                                           The time field
401          * @param[in]           amount                                          The amount to roll up/down
402          * @exception           E_SUCCESS                                       The method is successful.
403          * @exception           E_INVALID_STATE                         In this method, time fields of this instance are calculated. @n
404          *                                                                                              If any time field value previously set is invalid, this exception is returned.
405          * @exception           E_INVALID_ARG                           The specified @c field is invalid (for example, @c TIME_FIELD_DST_OFFSET, @c TIME_FIELD_ZONE_OFFSET).
406          * @exception           E_OUT_OF_RANGE                          In this method, time fields of this instance are calculated. @n
407          *                                                                                              If the value of the time fields go out of range, this exception is returned.
408          */
409         virtual result Roll(TimeField field, int amount);
410
411
412         /**
413          * Gets the midnight, local time at or before the Gregorian cutover in milliseconds.
414          *
415          * @since                       2.0
416          *
417          * @return                      The midnight, local time at or before the Gregorian cutover in milliseconds. @n
418          *                                      If this method fails, @c -1 is returned. @n
419          *                                      The specific error code can be accessed using the GetLastResult() method.
420          */
421         long long GetNormalizedGregorianCutover(void) const;
422
423         /**
424          * Gets the year of the Gregorian cutover, with @c 0 representing 1 BC, @c -1 representing 2 BC, and so on.
425          *
426          * @since                       2.0
427          *
428          * @return                      The year of the Gregorian cutover @n
429          *                                      If this method fails, @c -1 is returned. @n
430          *                                      The specific error code can be accessed using the GetLastResult() method.
431          */
432         int GetGregorianCutoverYear(void) const;
433
434         /**
435          * Gets the Julian day number of the Gregorian cutover.
436          *
437          * @since                       2.0
438          *
439          * @return                      The Julian day number of the Gregorian cutover
440          */
441         int GetCutoverJulianDay(void) const;
442
443
444         /**
445          * Checks whether the current calendar is a Gregorian calendar or not.
446          *
447          * @since                       2.0
448          *
449          * @return                      @c true if the current calendar is a Gregorian calendar, @n
450          *                                      else @c false
451          */
452         bool IsGregorian() const;
453
454
455         /**
456          * Gets the current time of the instance in milliseconds from epoch.
457          *
458          * @since                       2.0
459          *
460          * @return                      An error code
461          * @param[out]          millisec                                        The current time in milliseconds from the epoch
462          * @exception           E_SUCCESS                                       The method is successful.
463          * @exception           E_INVALID_STATE                         If any time field value previously set is invalid, this exception is returned.
464          * @exception           E_OUT_OF_RANGE                          A time field or its value is out of range.
465          */
466         result GetTimeInMillisecFromEpoch(long long& millisec) const;
467
468
469         /**
470          * Sets the current time of the instance with the specified milliseconds value.
471          *
472          * @since                       2.0
473          *
474          * @return                      An error code
475          * @param[in]           millisec                                        The new time in milliseconds from the epoch
476          * @exception           E_OUT_OF_RANGE                          A time field or its value is out of range.
477          */
478         result SetTimeInMillisecFromEpoch(long long millisec);
479
480
481         /**
482          * Converts the 1970-epoch day number to the Gregorian year, month, date, day of week, and day of year.
483          *
484          * @since                       2.0
485          *
486          * @param[in]           day                                                     The 1970-epoch day number
487          * @param[out]          year                                            The year to convert
488          * @param[out]          month                                           The month to convert
489          * @param[out]          dayOfMonth                                      The date to convert
490          * @param[out]          dayOfWeek                                       The day of week to convert
491          * @param[out]          dayOfYear                                       The day of year to convert
492          */
493         static void DayToFields(int day, int& year, int& month, int& dayOfMonth, int& dayOfWeek, int& dayOfYear);
494
495 private:
496         /*
497          * @enum                GregorianCalendarEras
498          *
499          * Defines Era for Gregorian calendar. The indexing is 0-based.
500          */
501         enum GregorianCalendarEras
502         {
503                 GREGORIAN_CALENDAR_BC = 0,      // BC
504                 GREGORIAN_CALENDAR_AD = 1,      // AD
505
506                 GREGORIAN_CALENDAR_BCE = 0,     // BCE
507                 GREGORIAN_CALENDAR_CE = 1,      // CE
508         };
509
510         /*
511          * The implementation of this copy constructor is intentionally blank and declared as private to
512          * prohibit copying of objects.
513          */
514         GregorianCalendar(const GregorianCalendar& gregorianCalendar);
515
516         /*
517          * The implementation of this copy assignment operator is intentionally blank and declared as private
518          * to prohibit copying of objects.
519          */
520         GregorianCalendar& operator =(const GregorianCalendar& gregorianCalendar);
521
522         // added for backward compatibility
523         virtual result RollWithSingleUnit(TimeField field, bool up);
524         virtual result ComputeTimeFields(void);
525         virtual result ComputeTime(void);
526         virtual int GetMonthLength(int extendedYear, int month) const;
527         virtual int HandleGetLimit(TimeField field, CalendarLimitType limitType) const;
528         virtual Calendar* CloneN(void) const;
529
530 public:
531         /*
532          * The length of months.
533          *
534          * @since 2.0
535          */
536         static const int MONTH_LENGTH[24];
537
538         /*
539          * The days of a year.
540          *
541          * @since 2.0
542          */
543         static const int NUM_DAYS[24];
544
545         /*
546          * The Gregorian cutover number for Julian day.
547          *
548          * @since 2.0
549          */
550         static const int CUTOVER_JULIAN_DAY = 2299161;      // Oct 15, 1582
551
552         /*
553          * The epoch year.
554          *
555          * @since 2.0
556          */
557         static const int EPOCH_YEAR = 1970;
558
559         /*
560          * The epoch start for Julian day.
561          *
562          * @since 2.0
563          */
564         static const int EPOCH_START_AS_JULIAN_DAY = 2440588; // Jan 1, 1970(Gregorian)
565
566         /*
567          * Jan 1, 1 epoch start for Julian day.
568          *
569          * @since 2.0
570          */
571         static const int JAN_1_1_JULIAN_DAY = 1721426;  // Jan 1, 1 CE Gregorian
572
573         /*
574          * Temporary value for the Gregorian cutover.
575          *
576          * @since 2.0
577          */
578         static const long long PAPAL_CUTOVER =
579                 ((long long) (GregorianCalendar::CUTOVER_JULIAN_DAY -
580                                           GregorianCalendar::EPOCH_START_AS_JULIAN_DAY) * (long long) ONE_DAY_IN_MILLISEC);
581
582         /*
583          * Maximum value for longlong.
584          *
585          * @since 2.0
586          */
587         static const long long MAX_LONGLONG = (2 ^ 63) - 1;
588
589         /*
590          * Minimum value for longlong.
591          *
592          * @since 2.0
593          */
594         static const long long MIN_LONGLONG = -1 * (2 ^ 63);
595
596         /*
597          * Maximum value for Julian day.
598          *
599          * @since 2.0
600          */
601         static const int MAX_JULIAN = 0x7F000000;
602
603         /*
604          * Minimum value for Julian day.
605          *
606          * @since 2.0
607          */
608         static const int MIN_JULIAN = -0x7F000000;
609
610         /*
611          * Maximum millisecond value for Julian day.
612          *
613          * @since 2.0
614          */
615         static const long long MAX_MILLISEC = ((GregorianCalendar::MAX_JULIAN - GregorianCalendar::EPOCH_START_AS_JULIAN_DAY) * (long long) ONE_DAY_IN_MILLISEC);
616
617         /*
618          * Minimum millisecond value for Julian day.
619          *
620          * @since 2.0
621          */
622         static const long long MIN_MILLISEC = ((GregorianCalendar::MIN_JULIAN - GregorianCalendar::EPOCH_START_AS_JULIAN_DAY) * (long long) ONE_DAY_IN_MILLISEC);
623
624         /*
625          * Epoch offset in millisecond value.
626          *
627          * @since 2.0
628          */
629         static const long long EPOCH_OFFSET_IN_MILLISEC = 62135596800000LL; // Jan 1, 1970
630
631         /*
632          * Default Gregorian cutover.
633          *
634          * @since 2.0
635          */
636         static const long long DEFAULT_GREGORIAN_CUTOVER = -12219292800000LL;
637
638 private:
639         long long __normalizedGregorianCutover; // = __gregorianCutover;
640         int __gregorianCutoverYear; // 1582
641         int __cutoverJulianDay;
642
643         friend class _GregorianCalendarImpl;
644         class _GregorianCalendarImpl* __pGregorianCalendarImpl;
645
646 }; // GregorianCalendar
647
648 }} // Tizen::Locales
649
650 #endif //_FLCL_GREGORIAN_CALENDAR_H_