6 #ifndef ACE_TIME_ZONE_PROCESSOR_H
7 #define ACE_TIME_ZONE_PROCESSOR_H
10 #include "OffsetDateTime.h"
25 static const uint8_t kTypeNotFound = 0;
26 static const uint8_t kTypeExact = 1;
27 static const uint8_t kTypeGap = 2;
28 static const uint8_t kTypeOverlap = 3;
65 uint8_t
type = kTypeNotFound;
263 inline bool operator!=(
const ZoneProcessor& a,
const ZoneProcessor& b) {
290 MonthDay calcStartDayOfMonth(int16_t year, uint8_t month,
291 uint8_t onDayOfWeek, int8_t onDayOfMonth);
349 void createAbbreviation(
355 const char* letterString);
static int16_t currentEpochYear()
Get the current epoch year.
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...
int32_t stdOffsetSeconds
STD offset of the resulting OffsetDateTime.
int32_t dstOffsetSeconds
DST offset of the resulting OffsetDateTime.
int32_t reqDstOffsetSeconds
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.
int32_t reqStdOffsetSeconds
STD offset of the Transition which matched the epochSeconds requested by findByEpochSeconds(),...
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.
int16_t mYear
Year that was used to calculate the transitions in the current cache.
bool isFilled(int16_t year) const
Check if the Transition cache is filled for the given year and current epochYear.
virtual void printShortNameTo(Print &printer) const =0
Print a short human-readable identifier (e.g.
uint8_t const mType
User-visible indicator of the subclass of ZoneProcessor, which implments a specific time-zone algorit...
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.
int16_t mEpochYear
Epoch year that was used to calculate the transitions in the current cache.
virtual bool isLink() const =0
Return true if timezone is a Link entry pointing to a Zone entry.
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().