Skip to content

Commit

Permalink
add test for u w
Browse files Browse the repository at this point in the history
  • Loading branch information
mnatsuhara committed Apr 15, 2021
1 parent e7b705a commit 5505ea3
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ void test_year_month_day_formatter() {
assert(format(STR("{:%Y %b %d}"), year_month_day{year{1234}, month{5}, day{6}}) == STR("1234 May 06"));
assert(format(STR("{:%F %D}"), invalid) == STR("1234-00-31 00/31/34"));
assert(format(STR("{:%a %A}"), year_month_day{year{1900}, month{1}, day{4}}) == STR("Thu Thursday"));
assert(format(STR("{:%u %w}"), year_month_day{year{1900}, month{1}, day{4}}) == STR("4 4"));

This comment was marked as resolved.

Copy link
@MattStephanson

MattStephanson Apr 16, 2021

Contributor

You might consider also testing a Sunday, for which %u and %v give different results. 10 December 1815, maybe? 😉

This comment was marked as resolved.

Copy link
@mnatsuhara

mnatsuhara Apr 16, 2021

Author Contributor

I will add a test for that in the weekday/weekday_indexed tests!

}

template <typename CharT>
Expand Down

0 comments on commit 5505ea3

Please sign in to comment.