AceTime  0.5
Date and time classes for Arduino that support timezones from the TZ Database, and a system clock that can synchronize from an NTP server or an RTC chip.
ExtendedZoneProcessor.cpp
1 /*
2  * MIT License
3  * Copyright (c) 2019 Brian T. Park
4  */
5 
6 #include "LocalDate.h"
7 #include "ExtendedZone.h"
8 #include "ExtendedZoneProcessor.h"
9 
10 namespace ace_time {
11 
12 const extended::ZoneEra ExtendedZoneProcessor::kAnchorEra ACE_TIME_PROGMEM = {
13  0 /*offsetCode*/,
14  nullptr /*zonePolicy*/,
15  0 /*deltaCode*/,
16  nullptr /*format*/,
17  LocalDate::kInvalidYearTiny /*untilYearTiny*/,
18  1 /*untilMonth*/,
19  1 /*untilDay*/,
20  0 /*untilTimeCode*/,
21  'w' /*untilTimeModifier*/
22 };
23 
24 void ExtendedZoneProcessor::printTo(Print& printer) const {
25  printer.print(ExtendedZone(mZoneInfo.zoneInfo()).name());
26 }
27 
28 void ExtendedZoneProcessor::printShortTo(Print& printer) const {
29  printer.print(ExtendedZone(mZoneInfo.zoneInfo()).shortName());
30 }
31 
32 }
void printTo(Print &printer) const override
Print a human-readable identifier (e.g.
void printShortTo(Print &printer) const override
Print a short human-readable identifier (e.g.
A thin wrapper around an extended::ZoneInfo data structure to provide a stable API access to some use...
Definition: ExtendedZone.h:23
static const int8_t kInvalidYearTiny
Sentinel yearTiny which indicates an error condition or sometimes a year that 'does not exist'...
Definition: LocalDate.h:45