6 #ifndef ACE_TIME_OFFSET_DATE_TIME_MUTATION_H
7 #define ACE_TIME_OFFSET_DATE_TIME_MUTATION_H
10 #include <AceCommon.h>
11 #include "OffsetDateTime.h"
14 namespace offset_date_time_mutation {
43 int16_t year = dateTime.
year();
44 ace_common::incrementModOffset(year, (int16_t) 100, (int16_t) 2000);
50 uint8_t month = dateTime.
month();
51 ace_common::incrementModOffset(month, (uint8_t) 12, (uint8_t) 1);
52 dateTime.
month(month);
57 uint8_t day = dateTime.
day();
58 ace_common::incrementModOffset(day, (uint8_t) 31, (uint8_t) 1);
64 uint8_t hour = dateTime.
hour();
65 ace_common::incrementMod(hour, (uint8_t) 24);
71 uint8_t minute = dateTime.
minute();
72 ace_common::incrementMod(minute, (uint8_t) 60);
The date (year, month, day), time (hour, minute, second) and fixed offset from UTC (timeOffset).
uint8_t day() const
Return the day of the month.
uint8_t hour() const
Return the hour.
uint8_t month() const
Return the month with January=1, December=12.
uint8_t minute() const
Return the minute.
int16_t year() const
Return the year.
void incrementMonth(OffsetDateTime &dateTime)
Increment the month by one within the interval [1, 12].
void incrementYear(OffsetDateTime &dateTime)
Increment the year by one within the interval [2000, 2099].
void incrementDay(OffsetDateTime &dateTime)
Increment the day by one within the interval [1, 31].
void incrementHour(OffsetDateTime &dateTime)
Increment the hour by one within the interval [0, 23].
void incrementMinute(OffsetDateTime &dateTime)
Increment the minute by one within the interval [0, 59].