6 #ifndef ACE_TIME_ZONE_PROCESSOR_H
7 #define ACE_TIME_ZONE_PROCESSOR_H
10 #include "TimeOffset.h"
11 #include "OffsetDateTime.h"
26 static const uint8_t kTypeNotFound = 0;
27 static const uint8_t kTypeExact = 1;
28 static const uint8_t kTypeGap = 2;
29 static const uint8_t kTypeOverlap = 3;
66 uint8_t
type = kTypeNotFound;
233 return mIsFilled && (year == mYear);
242 mutable bool mIsFilled =
false;
247 if (a.mType != b.mType)
return false;
251 inline bool operator!=(
const ZoneProcessor& a,
const ZoneProcessor& b) {
280 MonthDay calcStartDayOfMonth(int16_t year, uint8_t month,
281 uint8_t onDayOfWeek, int8_t onDayOfMonth);
Result of a search for transition at a specific epochSeconds or a specific LocalDateTime.
uint8_t fold
For findByLocalDateTime(), when type==kTypeOverlap, this is a copy of the requested LocalDateTime::fo...
int16_t dstOffsetMinutes
DST offset of the resulting OffsetDateTime.
int16_t reqStdOffsetMinutes
STD offset of the Transition which matched the epochSeconds requested by findByEpochSeconds(),...
int16_t stdOffsetMinutes
STD offset of the resulting OffsetDateTime.
int16_t reqDstOffsetMinutes
DST offset of the Transition which matched the epochSeconds requested by findByEpochSeconds(),...
const char * abbrev
Pointer to the abbreviation stored in the transient Transition::abbrev variable.
uint8_t type
Result of the findByEpochSeconds() or findByLocalDateTime() search methods.
Class that holds the date-time as the components (year, month, day, hour, minute, second) without reg...
static const int16_t kInvalidYear
Sentinel year which indicates one or more of the following conditions:
Base interface for ZoneProcessor classes.
uint8_t getType() const
Return the kTypeXxx of the current instance.
ZoneProcessor(uint8_t type)
Constructor.
virtual FindResult findByEpochSeconds(acetime_t epochSeconds) const =0
Return the search results at given epochSeconds.
virtual void printTargetNameTo(Print &printer) const =0
Print the full identifier (e.g.
virtual void printNameTo(Print &printer) const =0
Print a human-readable identifier (e.g.
bool isFilled(int16_t year) const
Check if the Transition cache is filled for the given year.
virtual void printShortNameTo(Print &printer) const =0
Print a short human-readable identifier (e.g.
virtual uint32_t getZoneId() const =0
Return the unique stable zoneId.
virtual FindResult findByLocalDateTime(const LocalDateTime &ldt) const =0
Return the search results at given LocalDateTime.
virtual bool equalsZoneKey(uintptr_t zoneKey) const =0
Return true if ZoneProcessor is associated with the given opaque zoneKey.
virtual bool equals(const ZoneProcessor &other) const =0
Return true if equal.
virtual bool isLink() const =0
Return true if timezone is a Link entry pointing to a Zone entry.
void resetTransitionCache()
Reset the internal transition cache.
virtual void setZoneKey(uintptr_t zoneKey)=0
Set the opaque zoneKey of this object to a new value, reseting any internally cached information.
Identifiers used by implementation code which need to be publically exported.
int32_t acetime_t
Type for the number of seconds from epoch.
The result of calcStartDayOfMonth().