gDay

EXESS_MAX_DAY_LENGTH

11U

The maximum length of a gDay string from exess_write_day()

struct ExessDay

Day in a Gregorian month.

uint8_t day

Day: [1, 31].

ExessTimezone zone

Timezone offset in quarter hours.

ExessResult exess_read_day(const char *str, ExessDay *out)

Read a gDay 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_day(ExessDay value, size_t buf_size, char *buf)

Write a canonical gDay string.

The output is always in canonical form, like ---12 or ---12+02: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.