AceTime 3.0.0 Date and time classes for Arduino that support timezones from the TZ Database.

Public Attributes | List of all members
ace_time::ZoneInfoMid::ZoneRule Struct Reference

A time zone transition rule. More...

`#include <ZoneInfoMid.h>`

## Public Attributes
int16_t const | fromYear
| FROM year.
int16_t const | toYear
| TO year.
uint8_t const | inMonth
| Determined by the IN column. More...
uint8_t const | onDayOfWeek
| Determined by the ON column. More...
int8_t const | onDayOfMonth
| Determined by the ON column. More...
uint8_t const | atTimeCode
| Determined by the AT column in units of 15-minutes from 00:00. More...
uint8_t const | atTimeModifier
| The atTimeModifier is a packed field containing 2 pieces of info: More...
uint8_t const | deltaCode
| Determined by the SAVE column and contains the offset from UTC, in 15-min increments. More...
uint8_t const | letterIndex
| Determined by the LETTER column. More...

## Detailed Description

A time zone transition rule.

It is useful to think of this as a transition rule that repeats on the given (month, day, hour) every year during the interval [fromYear, toYear] inclusive.

Definition at line 128 of file ZoneInfoMid.h.

## Member Data Documentation

## ◆ atTimeCode

uint8_t const ace_time::ZoneInfoMid::ZoneRule::atTimeCode

Determined by the AT column in units of 15-minutes from 00:00.

The range is (0 - 100) corresponding to 00:00 to 25:00.

Definition at line 160 of file ZoneInfoMid.h.

## ◆ atTimeModifier

uint8_t const ace_time::ZoneInfoMid::ZoneRule::atTimeModifier

The atTimeModifier is a packed field containing 2 pieces of info:

- The upper 4 bits represent the AT time suffix: 'w', 's' or 'u', represented by kSuffixW, kSuffixS and kSuffixU.
- The lower 4 bits represent the remaining 0-14 minutes of the AT field after truncation into atTimeCode. In other words, the full AT field in one-minute resolution is (15 * atTimeCode + (atTimeModifier & 0x0f)).

Definition at line 171 of file ZoneInfoMid.h.

## ◆ deltaCode

uint8_t const ace_time::ZoneInfoMid::ZoneRule::deltaCode

Determined by the SAVE column and contains the offset from UTC, in 15-min increments.

The deltaCode is equal to (originalDeltaCode + 4). Only the lower 4-bits is used, for consistency with the ZoneEra::deltaCode field. This allows the 4-bits to represent DST offsets from -1:00 to 2:45 in 15-minute increments.

The ZonePolicyBroker::deltaMinutes() method knows how to convert this field into minutes.

Definition at line 183 of file ZoneInfoMid.h.

## ◆ inMonth

uint8_t const ace_time::ZoneInfoMid::ZoneRule::inMonth

Determined by the IN column.

1=Jan, 12=Dec.

Definition at line 136 of file ZoneInfoMid.h.

## ◆ letterIndex

uint8_t const ace_time::ZoneInfoMid::ZoneRule::letterIndex

Determined by the LETTER column.

Determines the substitution into the 's' field (implemented here by just a '') of the ZoneInfo::format field. This is an index offset into the global kLetters array. Most LETTER string is a single character, e.g. "D", "S", or "". But a small number have LETTER fields which are longer than one character. For example:

- Belize ('CST'; used by America/Belize)
- Namibia ('WAT', 'CAT'; used by Africa/Windhoek)
- StJohns ('DD'; used by America/St_Johns and America/Goose_Bay)
- Troll ('+00' '+02'; used by Antarctica/Troll)

Definition at line 197 of file ZoneInfoMid.h.

## ◆ onDayOfMonth

int8_t const ace_time::ZoneInfoMid::ZoneRule::onDayOfMonth

Determined by the ON column.

Used with onDayOfWeek. Possible values are: 0, 1-31, or its corresponding negative values.

Definition at line 154 of file ZoneInfoMid.h.

## ◆ onDayOfWeek

uint8_t const ace_time::ZoneInfoMid::ZoneRule::onDayOfWeek

Determined by the ON column.

Possible values are: 0, 1=Mon, 7=Sun. There are 4 combinations:

    * onDayOfWeek=0, onDayOfMonth=(1-31): exact match
    * onDayOfWeek=1-7, onDayOfMonth=1-31: dayOfWeek>=dayOfMonth
    * onDayOfWeek=1-7, onDayOfMonth=-(1-31): dayOfWeek<=dayOfMonth
    * onDayOfWeek=1-7, onDayOfMonth=0: last{dayOfWeek}
    *

Definition at line 148 of file ZoneInfoMid.h.

The documentation for this struct was generated from the following file:

- /home/brian/src/AceTimeSuite/libraries/AceTimeLib/src/zoneinfo/ZoneInfoMid.h