Skip to content

Commit

Permalink
Try to clarify Calendar#fields documentation.
Browse files Browse the repository at this point in the history
Fixes #1425.
  • Loading branch information
Ms2ger authored and ptomato committed Jun 28, 2021
1 parent c9c2930 commit 869c374
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 869c374

Please sign in to comment.