mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-07 06:34:27 +02:00
Updated Boost datetime Examples Translated (markdown)
@@ -153,7 +153,7 @@ main()
|
|||||||
```
|
```
|
||||||
<a name="Localization_Demonstration"></a>
|
<a name="Localization_Demonstration"></a>
|
||||||
### Localization Demonstration
|
### Localization Demonstration
|
||||||
|
```c++
|
||||||
#include "date.h"
|
#include "date.h"
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -195,9 +195,9 @@ main()
|
|||||||
<< '/' << d1.year() << '\n';
|
<< '/' << d1.year() << '\n';
|
||||||
cout << d1.year() << '-' << d1.month() << '-' << d1.day() << '\n';
|
cout << d1.year() << '-' << d1.month() << '-' << d1.day() << '\n';
|
||||||
}
|
}
|
||||||
|
```
|
||||||
If your OS supports the `std::locale("de_DE")` the above can be simplified to:
|
If your OS supports the `std::locale("de_DE")` the above can be simplified to:
|
||||||
|
```c++
|
||||||
#include "date.h"
|
#include "date.h"
|
||||||
#include "tz.h"
|
#include "tz.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -218,7 +218,7 @@ If your OS supports the `std::locale("de_DE")` the above can be simplified to:
|
|||||||
cout << format(loc, "%D\n", local_days{d1});
|
cout << format(loc, "%D\n", local_days{d1});
|
||||||
cout << format(loc, "%F\n", local_days{d1});
|
cout << format(loc, "%F\n", local_days{d1});
|
||||||
}
|
}
|
||||||
|
```
|
||||||
<a name="Date_Period_Calculations"></a>
|
<a name="Date_Period_Calculations"></a>
|
||||||
### Date Period Calculations
|
### Date Period Calculations
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user