Skip to content

Commit

Permalink
Docs: Document that dayOfWeek, dayOfYear, and weekOfYear are 1-based
Browse files Browse the repository at this point in the history
This is already documented in the spec text, but an issue was still open
for adding it to the docs.

Closes: #1225
  • Loading branch information
ptomato authored and Ms2ger committed Mar 28, 2024
1 parent 39d8948 commit 2c9979f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/calendar.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ The following "invariants" (statements that are always true) hold for all built-
- `obj.with({ month: 1, day: 1 })` will always return the first day of the object's year.
- `obj.with({ month: obj.monthsInYear, day: Number.MAX_VALUE })` will always return the last day of the object's year.
- `obj.month === obj.monthsInYear` during the last month of any year
- `dayOfWeek`, `dayOfYear`, and `weekOfYear` are 1-based positive integers, that increase consecutively as time goes forward, except they reset at the boundary of a week or year, respectively

### Writing Cross-Calendar Code

Expand Down

0 comments on commit 2c9979f

Please sign in to comment.