AceTime
1.11.1
Date and time classes for Arduino that support timezones from the TZ Database.
|
6 #ifndef ACE_TIME_ZONE_PROCESSOR_H
7 #define ACE_TIME_ZONE_PROCESSOR_H
9 #include "common/common.h"
10 #include "TimeOffset.h"
11 #include "OffsetDateTime.h"
47 virtual bool isLink()
const = 0;
56 virtual uint32_t
getZoneId(
bool followLink =
false)
const = 0;
81 virtual const char*
getAbbrev(acetime_t epochSeconds)
const = 0;
112 virtual void printNameTo(Print& printer,
bool followLink =
false)
const = 0;
141 virtual void setZoneKey(uintptr_t zoneKey) = 0;
166 inline bool operator==(
const ZoneProcessor& a,
const ZoneProcessor& b) {
167 if (a.mType != b.mType)
return false;
171 inline bool operator!=(
const ZoneProcessor& a,
const ZoneProcessor& b) {
184 static const uint8_t kAbbrevSize = 6 + 1;
209 MonthDay calcStartDayOfMonth(int16_t year, uint8_t month,
210 uint8_t onDayOfWeek, int8_t onDayOfMonth);
virtual bool equals(const ZoneProcessor &other) const =0
Return true if equal.
Class that holds the date-time as the components (year, month, day, hour, minute, second) without reg...
ZoneProcessor(uint8_t type)
Constructor.
virtual void setZoneKey(uintptr_t zoneKey)=0
Set the opaque zoneKey of this object to a new value, reseting any internally cached information.
uint8_t getType() const
Return the kTypeXxx of the current instance.
A thin wrapper that represents a time offset from a reference point, usually 00:00 at UTC,...
virtual TimeOffset getDeltaOffset(acetime_t epochSeconds) const =0
Return the DST delta offset at epochSeconds.
virtual bool isLink() const =0
Return true if timezone is a Link entry pointing to a Zone entry.
The date (year, month, day), time (hour, minute, second) and offset from UTC (timeOffset).
virtual const char * getAbbrev(acetime_t epochSeconds) const =0
Return the time zone abbreviation at epochSeconds.
Base interface for ZoneProcessor classes.
virtual TimeOffset getUtcOffset(acetime_t epochSeconds) const =0
Return the total UTC offset at epochSeconds, including DST offset.
The result of calcStartDayOfMonth().
virtual uint32_t getZoneId(bool followLink=false) const =0
Return the unique stable zoneId.
virtual void printNameTo(Print &printer, bool followLink=false) const =0
Print a human-readable identifier (e.g.
virtual void printShortNameTo(Print &printer, bool followLink=false) const =0
Print a short human-readable identifier (e.g.
virtual OffsetDateTime getOffsetDateTime(const LocalDateTime &ldt) const =0
Return the best estimate of the OffsetDateTime at the given LocalDateTime for the timezone of the cur...
virtual bool equalsZoneKey(uintptr_t zoneKey) const =0
Return true if ZoneProcessor is associated with the given opaque zoneKey.