mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-04 21:24:26 +02:00
Updated Boost datetime Examples Translated (markdown)
@@ -457,27 +457,27 @@ an example using the IANA timezone database see the [Local to UTC Conversion](#L
|
|||||||
|
|
||||||
<a name="Daylight_Savings_Calc_Rules"></a>
|
<a name="Daylight_Savings_Calc_Rules"></a>
|
||||||
### Daylight Savings Calc Rules
|
### Daylight Savings Calc Rules
|
||||||
|
```c++
|
||||||
|
// This library does not support custom daylight savings rules. But it
|
||||||
|
// does support the notion of partial dates and finding the nth (or last)
|
||||||
|
// weekday of a month.
|
||||||
|
|
||||||
// This library does not support custom daylight savings rules. But it
|
#include "date.h"
|
||||||
// does support the notion of partial dates and finding the nth (or last)
|
|
||||||
// weekday of a month.
|
|
||||||
|
|
||||||
#include "date.h"
|
|
||||||
|
|
||||||
int
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
using namespace date;
|
|
||||||
auto fd_start = sun[1]/may;
|
|
||||||
auto ld_start = sun[last]/may;
|
|
||||||
auto nkd_start = sun[3]/may;
|
|
||||||
auto pd_start = may/1;
|
|
||||||
auto fd_end = sun[1]/oct;
|
|
||||||
auto ld_end = sun[last]/oct;
|
|
||||||
auto nkd_end = sun[3]/oct;
|
|
||||||
auto pd_end = oct/31;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
using namespace date::literals;
|
||||||
|
auto fd_start = sun[1]/may;
|
||||||
|
auto ld_start = sun[last]/may;
|
||||||
|
auto nkd_start = sun[3]/may;
|
||||||
|
auto pd_start = may/1;
|
||||||
|
auto fd_end = sun[1]/oct;
|
||||||
|
auto ld_end = sun[last]/oct;
|
||||||
|
auto nkd_end = sun[3]/oct;
|
||||||
|
auto pd_end = oct/31;
|
||||||
|
}
|
||||||
|
```
|
||||||
<a name="Flight_Time_Example"></a>
|
<a name="Flight_Time_Example"></a>
|
||||||
### Flight Time Example
|
### Flight Time Example
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user