From a80b0ee3b29beb06904654eda0c0a023672dfe83 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Mon, 28 Jun 2021 10:49:28 +0200 Subject: [PATCH] Try to clarify Calendar#fields documentation. Fixes #1425. --- docs/calendar.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/calendar.md b/docs/calendar.md index 6f3a093cc0..4e7e70dd30 100644 --- a/docs/calendar.md +++ b/docs/calendar.md @@ -368,7 +368,7 @@ Temporal.Calendar.from('chinese').dateUntil( ); // => P1M2D ``` -### calendar.**fields**(_fields_: Iterable) : Iterable +### calendar.**fields**(_fields_: Iterable<string>) : Iterable<string> **Parameters:** @@ -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()`).