gYearMonth¶
-
EXESS_MAX_YEAR_MONTH_LENGTH¶
15U
The maximum length of a
gYearMonthstring fromexess_write_year_month()
-
struct ExessYearMonth¶
A month in a Gregorian year.
-
int16_t year¶
Year: any positive or negative value.
-
uint8_t month¶
Month: [1, 12].
-
ExessTimezone zone¶
Timezone offset in quarter hours.
-
int16_t year¶
-
ExessResult exess_read_year_month(const char *str, ExessYearMonth *out)¶
Read a
gYearMonthstring after any leading whitespace.- Parameters:
str – String to read.
out – Parsed value, or zero on error.
- Returns:
The
countof characters read, and astatus.
-
ExessResult exess_write_year_month(ExessYearMonth value, size_t buf_size, char *buf)¶
Write a canonical
gYearMonthstring.The output is always in canonical form, like
2001-04.- Parameters:
value – Value to write.
buf_size – Size of
bufin bytes.buf – Output buffer, or null to only measure.
- Returns:
ExessStatus.EXESS_SUCCESSon success,ExessStatus.EXESS_NO_SPACEif the buffer is too small, orExessStatus.EXESS_BAD_VALUEif the value is invalid.