mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-07 06:34:27 +02:00
Updated Boost datetime Examples Translated (markdown)
@@ -221,14 +221,13 @@ main()
|
|||||||
```
|
```
|
||||||
<a name="Date_Period_Calculations"></a>
|
<a name="Date_Period_Calculations"></a>
|
||||||
### Date Period Calculations
|
### Date Period Calculations
|
||||||
|
```c++
|
||||||
|
#include "date.h"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#include "date.h"
|
int
|
||||||
#include <iostream>
|
main()
|
||||||
#include <iterator>
|
{
|
||||||
|
|
||||||
int
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
using namespace date;
|
using namespace date;
|
||||||
using date_period = std::pair<year_month_day, year_month_day>;
|
using date_period = std::pair<year_month_day, year_month_day>;
|
||||||
constexpr date_period ps[] =
|
constexpr date_period ps[] =
|
||||||
@@ -249,8 +248,8 @@ main()
|
|||||||
<< d << " --> "
|
<< d << " --> "
|
||||||
<< p.first << " / " << p.second << '\n';
|
<< p.first << " / " << p.second << '\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
```
|
||||||
<a name="Print_Holidays"></a>
|
<a name="Print_Holidays"></a>
|
||||||
### Print Holidays
|
### Print Holidays
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user