// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************** * Copyright (C) 1997-2013, International Business Machines * * Corporation and others. All Rights Reserved. * ******************************************************************************** * * File SIMPLETZ.H * * Modification History: * * Date Name Description * 04/21/97 aliu Overhauled header. * 08/10/98 stephen JDK 1.2 sync * Added setStartRule() / setEndRule() overloads * Added hasSameRules() * 09/02/98 stephen Added getOffset(monthLen) * Changed getOffset() to take UErrorCode * 07/09/99 stephen Removed millisPerHour (unused, for HP compiler) * 12/02/99 aliu Added TimeMode and constructor and setStart/EndRule * methods that take TimeMode. Added to docs. ******************************************************************************** */ #ifndef SIMPLETZ_H #define SIMPLETZ_H #include "unicode/utypes.h" #if U_SHOW_CPLUSPLUS_API /** * \file * \brief C++ API: SimpleTimeZone is a concrete subclass of TimeZone. */ #if !UCONFIG_NO_FORMATTING #include "unicode/basictz.h" U_NAMESPACE_BEGIN // forward declaration class InitialTimeZoneRule; class TimeZoneTransition; class AnnualTimeZoneRule; /** * <code>SimpleTimeZone</code> is a concrete subclass of <code>TimeZone</code> * that represents a time zone for use with a Gregorian calendar. This * class does not handle historical changes. * <P> * When specifying daylight-savings-time begin and end dates, use a negative value for * <code>dayOfWeekInMonth</code> to indicate that <code>SimpleTimeZone</code> should * count from the end of the month backwards. For example, if Daylight Savings * Time starts or ends at the last Sunday a month, use <code>dayOfWeekInMonth = -1</code> * along with <code>dayOfWeek = UCAL_SUNDAY</code> to specify the rule. * * @see Calendar * @see GregorianCalendar * @see TimeZone * @author D. Goldsmith, Mark Davis, Chen-Lieh Huang, Alan Liu */ class U_I18N_API SimpleTimeZone: public BasicTimeZone { … }; inline void SimpleTimeZone::setStartRule(int32_t month, int32_t dayOfWeekInMonth, int32_t dayOfWeek, int32_t time, UErrorCode& status) { … } inline void SimpleTimeZone::setStartRule(int32_t month, int32_t dayOfMonth, int32_t time, UErrorCode& status) { … } inline void SimpleTimeZone::setStartRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, int32_t time, UBool after, UErrorCode& status) { … } inline void SimpleTimeZone::setEndRule(int32_t month, int32_t dayOfWeekInMonth, int32_t dayOfWeek, int32_t time, UErrorCode& status) { … } inline void SimpleTimeZone::setEndRule(int32_t month, int32_t dayOfMonth, int32_t time, UErrorCode& status) { … } inline void SimpleTimeZone::setEndRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, int32_t time, UBool after, UErrorCode& status) { … } inline void SimpleTimeZone::getOffset(UDate date, UBool local, int32_t& rawOffsetRef, int32_t& dstOffsetRef, UErrorCode& ec) const { … } U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* U_SHOW_CPLUSPLUS_API */ #endif // _SIMPLETZ