Logo Search packages:      
Sourcecode: icu version File versions  Download package

VTimeZone Class Reference

#include <vtzone.h>

Inheritance diagram for VTimeZone:
Collaboration diagram for VTimeZone:

List of all members.

Public Types

enum  { kStandard = 0x01, kDaylight = 0x03, kFormer = 0x04, kLatter = 0x0C }
enum  EDisplayType {
  SHORT = 1, LONG, SHORT_GENERIC, LONG_GENERIC,
  SHORT_GMT, LONG_GMT, SHORT_COMMONLY_USED, GENERIC_LOCATION
}

Public Member Functions

virtual TimeZoneclone (void) const
virtual int32_t countTransitionRules (UErrorCode &status)
UnicodeStringgetDisplayName (UnicodeString &result) const
UnicodeStringgetDisplayName (const Locale &locale, UnicodeString &result) const
UnicodeStringgetDisplayName (UBool daylight, EDisplayType style, UnicodeString &result) const
UnicodeStringgetDisplayName (UBool daylight, EDisplayType style, const Locale &locale, UnicodeString &result) const
virtual int32_t getDSTSavings () const
virtual UClassID getDynamicClassID (void) const
UnicodeStringgetID (UnicodeString &ID) const
UBool getLastModified (UDate &lastModified) const
virtual UBool getNextTransition (UDate base, UBool inclusive, TimeZoneTransition &result)
virtual int32_t getOffset (uint8_t era, int32_t year, int32_t month, int32_t day, uint8_t dayOfWeek, int32_t millis, UErrorCode &status) const
virtual int32_t getOffset (uint8_t era, int32_t year, int32_t month, int32_t day, uint8_t dayOfWeek, int32_t millis, int32_t monthLength, UErrorCode &status) const
virtual void getOffset (UDate date, UBool local, int32_t &rawOffset, int32_t &dstOffset, UErrorCode &ec) const
virtual void getOffsetFromLocal (UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt, int32_t &rawOffset, int32_t &dstOffset, UErrorCode &status)
virtual UBool getPreviousTransition (UDate base, UBool inclusive, TimeZoneTransition &result)
virtual int32_t getRawOffset (void) const
virtual void getSimpleRulesNear (UDate date, InitialTimeZoneRule *&initial, AnnualTimeZoneRule *&std, AnnualTimeZoneRule *&dst, UErrorCode &status)
virtual void getTimeZoneRules (const InitialTimeZoneRule *&initial, const TimeZoneRule *trsrules[], int32_t &trscount, UErrorCode &status)
UBool getTZURL (UnicodeString &url) const
virtual UBool hasEquivalentTransitions (BasicTimeZone &tz, UDate start, UDate end, UBool ignoreDstAmount, UErrorCode &ec)
virtual UBool hasSameRules (const TimeZone &other) const
virtual UBool inDaylightTime (UDate date, UErrorCode &status) const
virtual UBool operator!= (const TimeZone &that) const
VTimeZoneoperator= (const VTimeZone &right)
virtual UBool operator== (const TimeZone &that) const
void setID (const UnicodeString &ID)
void setLastModified (UDate lastModified)
virtual void setRawOffset (int32_t offsetMillis)
void setTZURL (const UnicodeString &url)
virtual UBool useDaylightTime (void) const
 VTimeZone (const VTimeZone &source)
void write (UnicodeString &result, UErrorCode &status) const
void write (UDate start, UnicodeString &result, UErrorCode &status)
void writeSimple (UDate time, UnicodeString &result, UErrorCode &status)
virtual ~VTimeZone ()

Static Public Member Functions

static void U_EXPORT2 adoptDefault (TimeZone *zone)
static int32_t U_EXPORT2 countEquivalentIDs (const UnicodeString &id)
static TimeZone *U_EXPORT2 createDefault (void)
static StringEnumeration *U_EXPORT2 createEnumeration ()
static StringEnumeration *U_EXPORT2 createEnumeration (int32_t rawOffset)
static StringEnumeration *U_EXPORT2 createEnumeration (const char *country)
static TimeZone *U_EXPORT2 createTimeZone (const UnicodeString &ID)
static StringEnumeration *U_EXPORT2 createTimeZoneIDEnumeration (USystemTimeZoneType zoneType, const char *region, const int32_t *rawOffset, UErrorCode &ec)
static VTimeZonecreateVTimeZone (const UnicodeString &vtzdata, UErrorCode &status)
static VTimeZonecreateVTimeZoneByID (const UnicodeString &ID)
static VTimeZonecreateVTimeZoneFromBasicTimeZone (const BasicTimeZone &basicTZ, UErrorCode &status)
static UnicodeString &U_EXPORT2 getCanonicalID (const UnicodeString &id, UnicodeString &canonicalID, UErrorCode &status)
static UnicodeString &U_EXPORT2 getCanonicalID (const UnicodeString &id, UnicodeString &canonicalID, UBool &isSystemID, UErrorCode &status)
static const UnicodeString
U_EXPORT2 
getEquivalentID (const UnicodeString &id, int32_t index)
static const TimeZone *U_EXPORT2 getGMT (void)
static int32_t U_EXPORT2 getRegion (const UnicodeString &id, char *region, int32_t capacity, UErrorCode &status)
static UClassID U_EXPORT2 getStaticClassID (void)
static const char *U_EXPORT2 getTZDataVersion (UErrorCode &status)
static void U_EXPORT2 operator delete (void *p) U_NO_THROW
static void U_EXPORT2 operator delete (void *, void *) U_NO_THROW
static void U_EXPORT2 operator delete[] (void *p) U_NO_THROW
static void *U_EXPORT2 operator new (size_t size) U_NO_THROW
static void *U_EXPORT2 operator new (size_t, void *ptr) U_NO_THROW
static void *U_EXPORT2 operator new[] (size_t size) U_NO_THROW
static void U_EXPORT2 setDefault (const TimeZone &zone)

Protected Types

enum  { kStdDstMask = kDaylight, kFormerLatterMask = kLatter }

Protected Member Functions

void getTimeZoneRulesAfter (UDate start, InitialTimeZoneRule *&initial, UVector *&transitionRules, UErrorCode &status)

Static Protected Member Functions

static UResourceBundleloadRule (const UResourceBundle *top, const UnicodeString &ruleid, UResourceBundle *oldbundle, UErrorCode &status)

Private Types

enum  { DEFAULT_VTIMEZONE_LINES = 100 }

Private Member Functions

void appendUNTIL (VTZWriter &writer, const UnicodeString &until, UErrorCode &status) const
void beginRRULE (VTZWriter &writer, int32_t month, UErrorCode &status) const
void beginZoneProps (VTZWriter &writer, UBool isDst, const UnicodeString &zonename, int32_t fromOffset, int32_t toOffset, UDate startTime, UErrorCode &status) const
void endZoneProps (VTZWriter &writer, UBool isDst, UErrorCode &status) const
void load (VTZReader &reader, UErrorCode &status)
void parse (UErrorCode &status)
 VTimeZone ()
void write (VTZWriter &writer, UErrorCode &status) const
void write (UDate start, VTZWriter &writer, UErrorCode &status)
void writeFinalRule (VTZWriter &writer, UBool isDst, const AnnualTimeZoneRule *rule, int32_t fromRawOffset, int32_t fromDSTSavings, UDate startTime, UErrorCode &status) const
void writeFooter (VTZWriter &writer, UErrorCode &status) const
void writeHeaders (VTZWriter &w, UErrorCode &status) const
void writeSimple (UDate time, VTZWriter &writer, UErrorCode &status)
void writeZone (VTZWriter &w, BasicTimeZone &basictz, UVector *customProps, UErrorCode &status) const
void writeZonePropsByDOM (VTZWriter &writer, UBool isDst, const UnicodeString &zonename, int32_t fromOffset, int32_t toOffset, int32_t month, int32_t dayOfMonth, UDate startTime, UDate untilTime, UErrorCode &status) const
void writeZonePropsByDOW (VTZWriter &writer, UBool isDst, const UnicodeString &zonename, int32_t fromOffset, int32_t toOffset, int32_t month, int32_t weekInMonth, int32_t dayOfWeek, UDate startTime, UDate untilTime, UErrorCode &status) const
void writeZonePropsByDOW_GEQ_DOM (VTZWriter &writer, UBool isDst, const UnicodeString &zonename, int32_t fromOffset, int32_t toOffset, int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, UDate startTime, UDate untilTime, UErrorCode &status) const
void writeZonePropsByDOW_GEQ_DOM_sub (VTZWriter &writer, int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, int32_t numDays, UDate untilTime, int32_t fromOffset, UErrorCode &status) const
void writeZonePropsByDOW_LEQ_DOM (VTZWriter &writer, UBool isDst, const UnicodeString &zonename, int32_t fromOffset, int32_t toOffset, int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, UDate startTime, UDate untilTime, UErrorCode &status) const
void writeZonePropsByTime (VTZWriter &writer, UBool isDst, const UnicodeString &zonename, int32_t fromOffset, int32_t toOffset, UDate time, UBool withRDATE, UErrorCode &status) const

Static Private Member Functions

static VTimeZonecreateVTimeZone (VTZReader *reader)

Private Attributes

UnicodeString icutzver
UDate lastmod
UnicodeString olsonzid
BasicTimeZonetz
UnicodeString tzurl
UVectorvtzlines

Detailed Description

VTimeZone is a class implementing RFC2445 VTIMEZONE. You can create a VTimeZone instance from a time zone ID supported by TimeZone. With the VTimeZone instance created from the ID, you can write out the rule in RFC2445 VTIMEZONE format. Also, you can create a VTimeZone instance from RFC2445 VTIMEZONE data stream, which allows you to calculate time zone offset by the rules defined by the data. Or, you can create a VTimeZone from any other ICU BasicTimeZone.

Note: The consumer of this class reading or writing VTIMEZONE data is responsible to decode or encode Non-ASCII text. Methods reading/writing VTIMEZONE data in this class do nothing with MIME encoding. ICU 3.8

Definition at line 41 of file vtzone.h.


The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index