You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 448b198
Browse filesBrowse the repository at this point in the historyBrowse files
Colin Robertson
authored
Merge pull request MicrosoftDocs#3225 from MicrosoftDocs/master637604991402649583
@@ -78,6 +78,30 @@ Construct a `weekday` with value *`wd`*.
78
78
3\) Computes what day of the week corresponds to the `std::chrono::sys_days` value `dp`, and constructs a `weekday` using that day.\
79
79
4\) Computes the day of the week that corresponds to the `std::chrono::local_days` value `dp`, and constructs a `weekday` using that day. It behaves as if you created the `weekday` using `weekday(std::chrono::sys_days(dp.time_since_epoch()))`.
80
80
81
+
### Example: Create a `weekday`
82
+
83
+
```cpp
84
+
// compile using: /std:c++latest
85
+
#include <iostream>
86
+
#include <chrono>
87
+
88
+
using namespace std::chrono;
89
+
90
+
int main()
91
+
{
92
+
weekday wd{ Wednesday };
93
+
weekday wd2{ 3 };
94
+
std::cout << wd << '\n' << wd2;
95
+
96
+
return 0;
97
+
}
98
+
```
99
+
100
+
```output
101
+
Wednesday
102
+
Wednesday
103
+
```
104
+
81
105
## <aname="c_encoding"></a> `c_encoding`
82
106
83
107
```cpp
@@ -138,17 +162,16 @@ using namespace std::chrono;
0 commit comments