mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-05 05:34:27 +02:00
Updated Examples and Recipes (markdown)
@@ -1635,7 +1635,8 @@ Turns out not hard at all.
|
||||
{
|
||||
using namespace date;
|
||||
using namespace std::chrono;
|
||||
std::cout << format("%F %T\n", sys_days{nov/29/2016} + 15h + 13min + microfortnights{35});
|
||||
std::cout << format("%F %T\n", sys_days{nov/29/2016} + 15h + 13min +
|
||||
microfortnights{35});
|
||||
}
|
||||
|
||||
The first thing to do is build your `chrono::duration` that represents a `microfortnight`. This is best done by first building a `fortnight`, and then multiplying that by `std::micro`. This will build some weird `chrono::duration` with a period we don't really have to know, but turns out to be not that far off from a second.
|
||||
|
Reference in New Issue
Block a user