Further WIP
This commit is contained in:
parent
106f60b5c0
commit
fdd856381d
2 changed files with 50 additions and 0 deletions
|
|
@ -142,6 +142,28 @@ void do_details_ordinal(struct iso8601_details* dt_out, const struct iso8601_det
|
|||
dt_out->date_prec = iso8601_prec_ord;
|
||||
}
|
||||
|
||||
void do_details_week(struct iso8601_details* dt_out, const struct iso8601_details* dt_in)
|
||||
{
|
||||
memcpy(dt_out, dt_in, sizeof(struct iso8601_details));
|
||||
dt_out->tz_sec = 0;
|
||||
dt_out->date_prec = iso8601_prec_week;
|
||||
}
|
||||
|
||||
void do_details_week_day(struct iso8601_details* dt_out, const struct iso8601_details* dt_in)
|
||||
{
|
||||
memcpy(dt_out, dt_in, sizeof(struct iso8601_details));
|
||||
dt_out->tz_sec = 0;
|
||||
dt_out->date_prec = iso8601_prec_wday;
|
||||
dt_out->time_prec = iso8601_prec_none;
|
||||
}
|
||||
|
||||
void do_details_week_full(struct iso8601_details* dt_out, const struct iso8601_details* dt_in)
|
||||
{
|
||||
memcpy(dt_out, dt_in, sizeof(struct iso8601_details));
|
||||
dt_out->tz_sec = 0;
|
||||
dt_out->date_prec = iso8601_prec_wday;
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct test {
|
||||
|
|
@ -169,6 +191,9 @@ const struct test tests[] = {
|
|||
{ "Local year", do_details_local_year },
|
||||
{ "Ordinal date", do_details_ordinal_date },
|
||||
{ "Ordinal full", do_details_ordinal },
|
||||
{ "Week number", do_details_week },
|
||||
{ "Week date", do_details_week_day },
|
||||
{ "Week full", do_details_week_full },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue