AceTime  1.0
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 <Print.h>
7 #include "LocalDate.h"
8 #include "ExtendedZone.h"
9 #include "ExtendedZoneProcessor.h"
10 
11 namespace ace_time {
12 
13 const extended::ZoneEra ExtendedZoneProcessor::kAnchorEra ACE_TIME_PROGMEM = {
14  nullptr /*zonePolicy*/,
15  nullptr /*format*/,
16  0 /*offsetCode*/,
17  0 /*deltaCode*/,
18  LocalDate::kInvalidYearTiny /*untilYearTiny*/,
19  1 /*untilMonth*/,
20  1 /*untilDay*/,
21  0 /*untilTimeCode*/,
22  extended::ZoneContext::kSuffixW /*untilTimeModifier*/
23 };
24 
25 void ExtendedZoneProcessor::printTo(Print& printer) const {
26  printer.print(ExtendedZone(mZoneInfo.zoneInfo()).name());
27 }
28 
29 void ExtendedZoneProcessor::printShortTo(Print& printer) const {
30  printer.print(ExtendedZone(mZoneInfo.zoneInfo()).shortName());
31 }
32 
33 }
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 &#39;does not exist&#39;...
Definition: LocalDate.h:45
static const uint8_t kSuffixW
Represents &#39;w&#39; or wall time.
Definition: ZoneContext.h:13