aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorMatt Mayer <[email protected]>2022-11-25 16:34:34 +0700
committerGitHub <[email protected]>2022-11-25 09:34:34 +0000
commit0af0fff4a410d7531368c709327ba0798a47091a (patch)
tree8e266be8a5c56487d241f9002287aef64046744d /src/modules
parentae7b3cadb243d7f0055898776871b34cac1a370b (diff)
downloadfaker-0af0fff4a410d7531368c709327ba0798a47091a.tar.xz
faker-0af0fff4a410d7531368c709327ba0798a47091a.zip
docs(date): clarify the purpose of the context parameter (#1576)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/date/index.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/date/index.ts b/src/modules/date/index.ts
index 339ab0ab..d5470dab 100644
--- a/src/modules/date/index.ts
+++ b/src/modules/date/index.ts
@@ -220,7 +220,7 @@ export class DateModule {
*
* @param options The optional options to use.
* @param options.abbr Whether to return an abbreviation. Defaults to `false`.
- * @param options.context Whether to return the name of a month in a context. Defaults to `false`.
+ * @param options.context Whether to return the name of a month in the context of a date. In the default `en` locale this has no effect, however, in other locales like `fr` or `ru`, this may affect grammar or capitalization, for example `'январь'` with `{ context: false }` and `'января'` with `{ context: true }` in `ru`. Defaults to `false`.
*
* @example
* faker.date.month() // 'October'
@@ -255,7 +255,7 @@ export class DateModule {
*
* @param options The optional options to use.
* @param options.abbr Whether to return an abbreviation. Defaults to `false`.
- * @param options.context Whether to return the day of the week in a context. Defaults to `false`.
+ * @param options.context Whether to return the day of the week in the context of a date. In the default `en` locale this has no effect, however, in other locales like `fr` or `ru`, this may affect grammar or capitalization, for example `'Lundi'` with `{ context: false }` and `'lundi'` with `{ context: true }` in `fr`. Defaults to `false`.
*
* @example
* faker.date.weekday() // 'Monday'