Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to clarify Calendar#fields documentation. #1580

Merged
merged 1 commit into from
Jun 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/calendar.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ Temporal.Calendar.from('chinese').dateUntil(
); // => P1M2D
```

### calendar.**fields**(_fields_: Iterable<string>) : Iterable<string>
### calendar.**fields**(_fields_: Iterable&lt;string>) : Iterable&lt;string>

**Parameters:**

Expand All @@ -377,7 +377,7 @@ Temporal.Calendar.from('chinese').dateUntil(
**Returns:** a new list of field names.

This method does not need to be called directly except in specialized code.
It is called indirectly when using the `from()` static methods and `with()` methods of `Temporal.PlainDateTime`, `Temporal.PlainDate`, `Temporal.PlainMonthDay`, `Temporal.PlainYearMonth`, and `Temporal.ZonedDateTime`.
It is called indirectly when using the `from()` static methods and `with()` methods of `Temporal.PlainDateTime`, `Temporal.PlainDate`, `Temporal.PlainMonthDay`, `Temporal.PlainYearMonth`, and `Temporal.ZonedDateTime`, and a number of other methods.

Custom calendars should override this method if they accept fields in `from()` or `with()` other than the standard set of built-in calendar fields: `year`, `month`, `monthCode`, and `day`.
The input array contains the field names that are necessary for a particular operation (for example, `'monthCode'` and `'day'` for `Temporal.PlainMonthDay.prototype.with()`).
Expand Down