From 0fa1962ddc0f3a9675f16e2d275d7e52fa59103c Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Tue, 22 May 2018 15:38:36 -0400 Subject: [PATCH] Updated FAQ (markdown) --- FAQ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index 4e7d784..8650ead 100644 --- a/FAQ.md +++ b/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++