Skip to content

Commit

Permalink
chore(date): adjust to our standard implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT committed Nov 22, 2022
1 parent 6e1009a commit 54865c6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/modules/date/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,8 @@ export class DateModule {
*
* @since 3.0.1
*/
month(options?: { abbr?: boolean; context?: boolean }): string {
const abbr = options?.abbr ?? false;
const context = options?.context ?? false;
month(options: { abbr?: boolean; context?: boolean } = {}): string {
const { abbr = false, context = false } = options;

const source = this.faker.definitions.date.month;
let type: keyof DateEntryDefinition;
Expand Down Expand Up @@ -266,9 +265,8 @@ export class DateModule {
*
* @since 3.0.1
*/
weekday(options?: { abbr?: boolean; context?: boolean }): string {
const abbr = options?.abbr ?? false;
const context = options?.context ?? false;
weekday(options: { abbr?: boolean; context?: boolean } = {}): string {
const { abbr = false, context = false } = options;

const source = this.faker.definitions.date.weekday;
let type: keyof DateEntryDefinition;
Expand Down

0 comments on commit 54865c6

Please sign in to comment.