mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-04 13:14:26 +02:00
Updated FAQ (markdown)
2
FAQ.md
2
FAQ.md
@@ -164,7 +164,7 @@ This better support takes two forms: Reducing the importance of the encoding on
|
||||
|
||||
But ultimately this library chose the [0, 6] encoding. Why?
|
||||
|
||||
This library was written to enable clients to abandon the ancient C/POSIX `<time.h>` API. However the reality is that clients still often have to interoperate with legacy code that uses the old `<time.h>` API. This old API using the [0, 6] encoding for the `tm_wday` member of the `struct tm`. It is easier on the client to maintain encoding compatibility with `struct tm` than it is if this library rigidly stuck to the ISO encoding. With this compatibility, filling out the `tm_wday` member of `struct tm` is as easy as:
|
||||
This library was written to enable clients to abandon the ancient C/POSIX `<time.h>` API. However the reality is that clients still often have to interoperate with legacy code that uses the old `<time.h>` API. This old API uses the [0, 6] encoding for the `tm_wday` member of the `struct tm`. It is easier on the client to maintain encoding compatibility with `struct tm` than it is if this library rigidly stuck to the ISO encoding. With this compatibility, filling out the `tm_wday` member of `struct tm` is as easy as:
|
||||
```c++
|
||||
tm.tm_wday = unsigned{wd};
|
||||
```
|
||||
|
Reference in New Issue
Block a user