]>
git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/dangical.h
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 *****************************************************************************
5 * Copyright (C) 2013, International Business Machines Corporation
6 * and others. All Rights Reserved.
7 *****************************************************************************
10 *****************************************************************************
16 #include "unicode/utypes.h"
18 #if !UCONFIG_NO_FORMATTING
20 #include "unicode/calendar.h"
21 #include "unicode/timezone.h"
27 * <p><code>DangiCalendar</code> is a concrete subclass of {@link Calendar}
28 * that implements a traditional Korean lunisolar calendar.</p>
30 * <p>DangiCalendar usually should be instantiated using
31 * {@link com.ibm.icu.util.Calendar#getInstance(ULocale)} passing in a <code>ULocale</code>
32 * with the tag <code>"@calendar=dangi"</code>.</p>
36 class DangiCalendar
: public ChineseCalendar
{
38 //-------------------------------------------------------------------------
40 //-------------------------------------------------------------------------
43 * Constructs a DangiCalendar based on the current time in the default time zone
44 * with the given locale.
46 * @param aLocale The given locale.
47 * @param success Indicates the status of DangiCalendar object construction.
48 * Returns U_ZERO_ERROR if constructed successfully.
51 DangiCalendar(const Locale
& aLocale
, UErrorCode
&success
);
57 DangiCalendar(const DangiCalendar
& other
);
63 virtual ~DangiCalendar();
69 virtual Calendar
* clone() const;
71 //----------------------------------------------------------------------
72 // Internal methods & astronomical calculations
73 //----------------------------------------------------------------------
77 const TimeZone
* getDangiCalZoneAstroCalc(void) const;
82 * @return The class ID for this object. All objects of a given class have the
83 * same class ID. Objects of other classes have different class IDs.
86 virtual UClassID
getDynamicClassID(void) const;
89 * Return the class ID for this class. This is useful only for comparing to a return
90 * value from getDynamicClassID(). For example:
92 * Base* polymorphic_pointer = createPolymorphicObject();
93 * if (polymorphic_pointer->getDynamicClassID() ==
94 * Derived::getStaticClassID()) ...
96 * @return The class ID for all objects of this class.
99 U_I18N_API
static UClassID U_EXPORT2
getStaticClassID(void);
102 * return the calendar type, "dangi".
104 * @return calendar type
107 const char * getType() const;
112 DangiCalendar(); // default constructor not implemented