Skip to content

docs(date): clarify the purpose of the context parameter #1576

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

4 changes: 2 additions & 2 deletions src/modules/date/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 a context. In the default `en` locale this has no effect, however, in other locales like `fr` or `ru`, it will return the name of the month in the context of a date. 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'
Expand Down Expand Up @@ -256,7 +256,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 a context. In the default `en` locale this has no effect, however, in other locales like `fr` or `ru`, it will return the day of the week in the context of a date. 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'
Expand Down