gMonthDay

EXESS_MAX_MONTH_DAY_LENGTH

13U

The maximum length of a gMonthDay string from exess_write_month_day()

struct ExessMonthDay

A recurring day in a Gregorian month.

uint8_t month

Month: [1, 12].

uint8_t day

Day: [1, 31].

ExessTimezone zone

Timezone offset in quarter hours.

ExessResult exess_read_month_day(const char *str, ExessMonthDay *out)

Read a gMonthDay string after any leading whitespace.

Parameters:
  • str – String to read.

  • out – Parsed value, or zero on error.

Returns:

The count of characters read, and a status.

ExessResult exess_write_month_day(ExessMonthDay value, size_t buf_size, char *buf)

Write a canonical gMonthDay string.

The output is always in canonical form, like --04-12 or --05-01+03:00.

Parameters:
  • value – Value to write.

  • buf_size – Size of buf in bytes.

  • buf – Output buffer, or null to only measure.

Returns:

ExessStatus.EXESS_SUCCESS on success, ExessStatus.EXESS_NO_SPACE if the buffer is too small, or ExessStatus.EXESS_BAD_VALUE if the value is invalid.