Add explanatory comment.

The 0-indexed month value may be confusing.
This commit is contained in:
Ammon Smith 2022-02-14 18:11:49 -05:00
parent 465ec66760
commit 83372e7dea
1 changed files with 3 additions and 0 deletions

View File

@ -1607,6 +1607,9 @@ EX eItem targetRangedOrb(cell *c, orbAction a) {
bool isValentines() {
const time_t now = time(NULL);
const struct tm *datetime = localtime(&now);
// 0-indexed tm_mon, 1-index tm_mday
// So this is February (2nd month), and the 14th day.
return datetime->tm_mon == 1 && datetime->tm_mday == 14;
}