164339d36f8bd4db5025fe2988eda22b491a9219cFredrik Roubert// Copyright (C) 2016 and later: Unicode, Inc. and others. 264339d36f8bd4db5025fe2988eda22b491a9219cFredrik Roubert// License & terms of use: http://www.unicode.org/copyright.html 350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/* 450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho******************************************************************************* 58de051c3d18a56cc126f0f44e368495a52f9148cFredrik Roubert* Copyright (C) 2009-2016, International Business Machines Corporation and 68de051c3d18a56cc126f0f44e368495a52f9148cFredrik Roubert* others. All Rights Reserved. 750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho******************************************************************************* 850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho*/ 950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho#ifndef __ZRULE_H 1050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho#define __ZRULE_H 1150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 1250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 1350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * \file 1450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * \brief C API: Time zone rule classes 1550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 1650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 1750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho#include "unicode/utypes.h" 1850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 1927f654740f2a26ad62a5c155af9199af9e69b889claireho#if !UCONFIG_NO_FORMATTING 2027f654740f2a26ad62a5c155af9199af9e69b889claireho 218de051c3d18a56cc126f0f44e368495a52f9148cFredrik Roubert#include "unicode/uobject.h" 228de051c3d18a56cc126f0f44e368495a52f9148cFredrik Roubert 2350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho#ifndef UCNV_H 2450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 2550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 2650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * A TimeZoneRule. Use the zrule_* API to manipulate. Create with 2750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * zrule_open*, and destroy with zrule_close. 2850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 2950294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehostruct ZRule; 3050294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehotypedef struct ZRule ZRule; 3150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 3250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 3350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * An InitialTimeZoneRule. Use the izrule_* API to manipulate. Create with 3450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * izrule_open*, and destroy with izrule_close. 3550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 3650294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehostruct IZRule; 3750294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehotypedef struct IZRule IZRule; 3850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 3950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 4050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * An AnnualTimeZoneRule. Use the azrule_* API to manipulate. Create with 4150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * azrule_open*, and destroy with azrule_close. 4250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 4350294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehostruct AZRule; 4450294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehotypedef struct AZRule AZRule; 4550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 4650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho#endif 4750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 4850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/********************************************************************* 4950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * ZRule API 5050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho *********************************************************************/ 5150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 5250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 5350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Disposes of the storage used by a ZRule object. This function should 5450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * be called exactly once for objects returned by zrule_open*. 5550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param set the object to dispose of 5650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 57b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI void U_EXPORT2 5850294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehozrule_close(ZRule* rule); 5950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 6050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 6150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Returns true if rule1 is identical to rule2 6250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * and vis versa. 6350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule1 to be checked for containment 6450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule2 to be checked for containment 6550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return true if the test condition is met 6650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 67b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI UBool U_EXPORT2 6850294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehozrule_equals(const ZRule* rule1, const ZRule* rule2); 6950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 7050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 7150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Fills in "name" with the name of this time zone. 7250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule, the Zrule to use 7350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param name Receives the name of this time zone. 7450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param nameLength, length of the returned name 7550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 76b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI void U_EXPORT2 7750294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehozrule_getName(ZRule* rule, UChar* name, int32_t nameLength); 7850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 7950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 8050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Gets the standard time offset. 8150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule, the Zrule to use 8250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return The standard time offset from UTC in milliseconds. 8350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 84b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI int32_t U_EXPORT2 8550294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehozrule_getRawOffset(ZRule* rule); 8650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 8750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 8850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Gets the amount of daylight saving delta time from the standard time. 8950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule, the Zrule to use 9050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return The amount of daylight saving offset used by this rule 9150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * in milliseconds. 9250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 93b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI int32_t U_EXPORT2 9450294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehozrule_getDSTSavings(ZRule* rule); 9550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 9650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 9750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Returns if this rule represents the same rule and offsets as another. 9850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * When two ZRule objects differ only its names, this method 9950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * returns true. 10050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule1 to be checked for containment 10150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule2 to be checked for containment 10250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return true if the other <code>TimeZoneRule</code> is the same as this one. 10350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 104b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI UBool U_EXPORT2 10550294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehozrule_isEquivalentTo(ZRule* rule1, ZRule* rule2); 10650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 10750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/********************************************************************* 10850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * IZRule API 10950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho *********************************************************************/ 11050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 11150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 11250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Constructs an IZRule with the name, the GMT offset of its 11350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * standard time and the amount of daylight saving offset adjustment. 11450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param name The time zone name. 11550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param nameLength The length of the time zone name. 11650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rawOffset The UTC offset of its standard time in milliseconds. 11750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param dstSavings The amount of daylight saving offset adjustment in milliseconds. 11850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * If this ia a rule for standard time, the value of this argument is 0. 11950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 120b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI IZRule* U_EXPORT2 12150294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoizrule_open(const UChar* name, int32_t nameLength, int32_t rawOffset, int32_t dstSavings); 12250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 12350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 12450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Disposes of the storage used by a IZRule object. This function should 12550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * be called exactly once for objects returned by izrule_open*. 12650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param set the object to dispose of 12750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 128b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI void U_EXPORT2 12950294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoizrule_close(IZRule* rule); 13050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 13150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 13250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Returns a copy of this object. 13350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule the original IZRule 13450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return the newly allocated copy of the IZRule 13550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 136b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI IZRule* U_EXPORT2 13750294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoizrule_clone(IZRule *rule); 13850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 13950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 14050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Returns true if rule1 is identical to rule2 14150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * and vis versa. 14250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule1 to be checked for containment 14350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule2 to be checked for containment 14450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return true if the test condition is met 14550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 146b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI UBool U_EXPORT2 14750294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoizrule_equals(const IZRule* rule1, const IZRule* rule2); 14850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 14950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 15050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Fills in "name" with the name of this time zone. 15150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule, the IZrule to use 15250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param name Receives the name of this time zone. 15350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param nameLength, length of the returned name 15450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 155b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI void U_EXPORT2 15650294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoizrule_getName(IZRule* rule, UChar* & name, int32_t & nameLength); 15750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 15850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 15950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Gets the standard time offset. 16050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule, the IZrule to use 16150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return The standard time offset from UTC in milliseconds. 16250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 163b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI int32_t U_EXPORT2 16450294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoizrule_getRawOffset(IZRule* rule); 16550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 16650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 16750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Gets the amount of daylight saving delta time from the standard time. 16850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule, the IZrule to use 16950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return The amount of daylight saving offset used by this rule 17050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * in milliseconds. 17150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 172b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI int32_t U_EXPORT2 17350294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoizrule_getDSTSavings(IZRule* rule); 17450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 17550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 17650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Returns if this rule represents the same rule and offsets as another. 17750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * When two IZRule objects differ only its names, this method 17850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * returns true. 17950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule1 to be checked for containment 18050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule2 to be checked for containment 18150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return true if the other <code>TimeZoneRule</code> is the same as this one. 18250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 183b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI UBool U_EXPORT2 18450294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoizrule_isEquivalentTo(IZRule* rule1, IZRule* rule2); 18550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 18650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 18750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Gets the very first time when this rule takes effect. 18850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule The IZrule to use 18950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param prevRawOffset The standard time offset from UTC before this rule 19050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * takes effect in milliseconds. 19150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param prevDSTSavings The amount of daylight saving offset from the 19250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * standard time. 19350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param result Receives the very first time when this rule takes effect. 19450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return true if the start time is available. When false is returned, output parameter 19550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * "result" is unchanged. 19650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 197b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI UBool U_EXPORT2 19850294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoizrule_getFirstStart(IZRule* rule, int32_t prevRawOffset, int32_t prevDSTSavings, 19950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho UDate& result); 20050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 20150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 20250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Gets the final time when this rule takes effect. 20350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule The IZrule to use 20450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param prevRawOffset The standard time offset from UTC before this rule 20550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * takes effect in milliseconds. 20650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param prevDSTSavings The amount of daylight saving offset from the 20750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * standard time. 20850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param result Receives the final time when this rule takes effect. 20950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return true if the start time is available. When false is returned, output parameter 21050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * "result" is unchanged. 21150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 212b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI UBool U_EXPORT2 21350294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoizrule_getFinalStart(IZRule* rule, int32_t prevRawOffset, int32_t prevDSTSavings, 21450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho UDate& result); 21550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 21650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 21750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Gets the first time when this rule takes effect after the specified time. 21850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule The IZrule to use 21950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param base The first start time after this base time will be returned. 22050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param prevRawOffset The standard time offset from UTC before this rule 22150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * takes effect in milliseconds. 22250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param prevDSTSavings The amount of daylight saving offset from the 22350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * standard time. 22450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param inclusive Whether the base time is inclusive or not. 22550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param result Receives The first time when this rule takes effect after 22650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * the specified base time. 22750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return true if the start time is available. When false is returned, output parameter 22850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * "result" is unchanged. 22950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 230b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI UBool U_EXPORT2 23150294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoizrule_getNextStart(IZRule* rule, UDate base, int32_t prevRawOffset, 23250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho int32_t prevDSTSavings, UBool inclusive, UDate& result); 23350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 23450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 23550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Gets the most recent time when this rule takes effect before the specified time. 23650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule The IZrule to use 23750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param base The most recent time before this base time will be returned. 23850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param prevRawOffset The standard time offset from UTC before this rule 23950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * takes effect in milliseconds. 24050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param prevDSTSavings The amount of daylight saving offset from the 24150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * standard time. 24250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param inclusive Whether the base time is inclusive or not. 24350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param result Receives The most recent time when this rule takes effect before 24450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * the specified base time. 24550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return true if the start time is available. When false is returned, output parameter 24650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * "result" is unchanged. 24750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 248b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI UBool U_EXPORT2 24950294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoizrule_getPreviousStart(IZRule* rule, UDate base, int32_t prevRawOffset, 25050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho int32_t prevDSTSavings, UBool inclusive, UDate& result); 25150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 25250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 25350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 25450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Return the class ID for this class. This is useful only for comparing to 25550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * a return value from getDynamicClassID(). For example: 25650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * <pre> 25750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * . Base* polymorphic_pointer = createPolymorphicObject(); 25850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * . if (polymorphic_pointer->getDynamicClassID() == 25950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * . erived::getStaticClassID()) ... 26050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * </pre> 26150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule The IZrule to use 26250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return The class ID for all objects of this class. 26350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 264b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI UClassID U_EXPORT2 26550294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoizrule_getStaticClassID(IZRule* rule); 26650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 26750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 26850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This 26950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * method is to implement a simple version of RTTI, since not all C++ 27050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * compilers support genuine RTTI. Polymorphic operator==() and clone() 27150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * methods call this method. 27250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * 27350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @param rule The IZrule to use 27450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @return The class ID for this object. All objects of a 27550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * given class have the same class ID. Objects of 27650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * other classes have different class IDs. 27750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 278b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CAPI UClassID U_EXPORT2 27950294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoizrule_getDynamicClassID(IZRule* rule); 28050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 28150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho#endif 28227f654740f2a26ad62a5c155af9199af9e69b889claireho 28327f654740f2a26ad62a5c155af9199af9e69b889claireho#endif 284