This is an archive of the discontinued LLVM Phabricator instance.

[libc++] [chrono] Fix year_month_weekday::ok() implementation.
ClosedPublic

Authored by curdeius on Nov 14 2019, 4:20 PM.

Diff Detail

Event Timeline

curdeius created this revision.Nov 14 2019, 4:20 PM

The code here looks fine to me, but I want to think about the tests for a bit.
Thanks for the patch.

libcxx/include/chrono
1861

There's no need to remove this at this time.

mclow.lists added inline comments.Nov 15 2019, 1:04 AM
libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ok.pass.cpp
59–68

How about a test for the 0th Wednesday, and the -1st Tuesday?

curdeius updated this revision to Diff 229503.Nov 15 2019, 4:06 AM
  • Add tests. Update Returns commment according to [time.cal.ymwd.members]/21.
curdeius marked an inline comment as done.Nov 15 2019, 4:07 AM
mclow.lists accepted this revision.Nov 15 2019, 5:32 AM

LGTM, thanks.

This revision is now accepted and ready to land.Nov 15 2019, 5:32 AM
This revision was automatically updated to reflect the committed changes.