Updated FAQ (markdown)

Howard Hinnant
2018-05-22 15:38:36 -04:00
parent 69304b01ec
commit 0fa1962ddc

2
FAQ.md

@@ -175,7 +175,7 @@ Filling out the `tm_wday` member of `struct tm` with a `weekday` is also easy:
tm.tm_wday = (wd - Sunday).count();
```
Indeed, `tm_wday`'s specification says: "days since Sunday — [0, 6]"
Indeed, `tm_wday`'s specification says: "days since Sunday — [0, 6]." This formulation works, even if the implementation is encoding `weekday` with [1, 7], because `weekday` difference is specified to be circular (modulo 7).
As a demonstration of the lowered importance of weekday encoding in calendrical algorithms, see [how to print a calendar](https://github.com/HowardHinnant/date/wiki/Examples-and-Recipes#calendar) which is configurable on the first day of the week. For example here is how to use this code to make Thursday the first day of the week:
```c++