#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Calendar object
#include "unicode/ucal.h"
#include "unicode/umisc.h"
-#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
class ICUServiceFactory;
*/
class U_I18N_API Calendar : public UObject {
public:
-
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Field IDs for date and time. Used to specify date/time fields. ERA is calendar
* specific. Example ranges given are for illustration only; see specific Calendar
FIELD_COUNT = UCAL_FIELD_COUNT // See ucal.h for other fields.
#endif /* U_HIDE_DEPRECATED_API */
};
+#endif // U_FORCE_HIDE_DEPRECATED_API
#ifndef U_HIDE_DEPRECATED_API
/**
* @return a polymorphic copy of this calendar.
* @stable ICU 2.0
*/
- virtual Calendar* clone(void) const = 0;
+ virtual Calendar* clone() const = 0;
/**
* Creates a Calendar using the default timezone and locale. Clients are responsible
*/
UBool after(const Calendar& when, UErrorCode& status) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* UDate Arithmetic function. Adds the specified (signed) amount of time to the given
* time field, based on the calendar's rules. For example, to subtract 5 days from
* @deprecated ICU 2.6. use add(UCalendarDateFields field, int32_t amount, UErrorCode& status) instead.
*/
virtual void add(EDateFields field, int32_t amount, UErrorCode& status);
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* UDate Arithmetic function. Adds the specified (signed) amount of time to the given
*/
inline void roll(UCalendarDateFields field, UBool up, UErrorCode& status);
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Time Field Rolling function. Rolls by the given amount on the given
* time field. For example, to roll the current date up by one day, call
* @deprecated ICU 2.6. Use roll(UCalendarDateFields field, int32_t amount, UErrorCode& status) instead.
*/
virtual void roll(EDateFields field, int32_t amount, UErrorCode& status);
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Time Field Rolling function. Rolls by the given amount on the given
*/
virtual void roll(UCalendarDateFields field, int32_t amount, UErrorCode& status);
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Return the difference between the given time and the time this
* calendar object is set to. If this calendar is set
* @deprecated ICU 2.6. Use fieldDifference(UDate when, UCalendarDateFields field, UErrorCode& status).
*/
virtual int32_t fieldDifference(UDate when, EDateFields field, UErrorCode& status);
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Return the difference between the given time and the time this
*/
uint8_t getMinimalDaysInFirstWeek(void) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the minimum value for the given time field. e.g., for Gregorian
* DAY_OF_MONTH, 1.
* @deprecated ICU 2.6. Use getMinimum(UCalendarDateFields field) instead.
*/
virtual int32_t getMinimum(EDateFields field) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the minimum value for the given time field. e.g., for Gregorian
*/
virtual int32_t getMinimum(UCalendarDateFields field) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the maximum value for the given time field. e.g. for Gregorian DAY_OF_MONTH,
* 31.
* @deprecated ICU 2.6. Use getMaximum(UCalendarDateFields field) instead.
*/
virtual int32_t getMaximum(EDateFields field) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the maximum value for the given time field. e.g. for Gregorian DAY_OF_MONTH,
*/
virtual int32_t getMaximum(UCalendarDateFields field) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the highest minimum value for the given field if varies. Otherwise same as
* getMinimum(). For Gregorian, no difference.
* @deprecated ICU 2.6. Use getGreatestMinimum(UCalendarDateFields field) instead.
*/
virtual int32_t getGreatestMinimum(EDateFields field) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the highest minimum value for the given field if varies. Otherwise same as
*/
virtual int32_t getGreatestMinimum(UCalendarDateFields field) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the lowest maximum value for the given field if varies. Otherwise same as
* getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28.
* @deprecated ICU 2.6. Use getLeastMaximum(UCalendarDateFields field) instead.
*/
virtual int32_t getLeastMaximum(EDateFields field) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the lowest maximum value for the given field if varies. Otherwise same as
*/
int32_t fFields[UCAL_FIELD_COUNT];
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* The flags which tell if a specified time field for the calendar is set.
* @deprecated ICU 2.8 use (fStamp[n]!=kUnset)
*/
UBool fIsSet[UCAL_FIELD_COUNT];
+#endif // U_FORCE_HIDE_DEPRECATED_API
/** Special values of stamp[]
* @stable ICU 2.0
* should only be called if this calendar is not lenient.
* @see #isLenient
* @see #validateField(int, int&)
- * @internal
*/
void validateFields(UErrorCode &status);
* <code>U_ILLEGAL_ARGUMENT_ERROR</code> will be set. Subclasses may
* use this method in their implementation of {@link
* #validateField(int, int&)}.
- * @internal
*/
void validateField(UCalendarDateFields field, int32_t min, int32_t max, UErrorCode& status);
#endif /* U_HIDE_INTERNAL_API */
U_NAMESPACE_END
-#endif // U_SHOW_CPLUSPLUS_API
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // _CALENDAR