diff --git a/doc/default/date.md b/doc/default/date.md index 5362c0bc2e..ff48daa7e6 100644 --- a/doc/default/date.md +++ b/doc/default/date.md @@ -22,14 +22,14 @@ Faker::Date.backward(days: 14) #=> "Fri, 19 Sep 2014" Faker::Date.birthday(min_age: 18, max_age: 65) #=> "Mar, 28 Mar 1986" # Random date in current year -Faker::Internet.in_date_period #=> # +Faker::Date.in_date_period #=> Tue, 28 May 2019 # Random date for range of year 2018 and month 2 # Keyword arguments: year, month -Faker::Date.in_date_period(year: 2018, month: 2) #=> # +Faker::Date.in_date_period(year: 2018, month: 2) #=> Sun, 04 Feb 2018 # Random date for range of current year and month 2 # Keyword arguments: month -Faker::Date.in_date_period(month: 2) #=> # +Faker::Date.in_date_period(month: 2) #=> Wed, 06 Feb 2019 ``` diff --git a/lib/faker/default/date.rb b/lib/faker/default/date.rb index 18f7bf2c2f..020417e785 100644 --- a/lib/faker/default/date.rb +++ b/lib/faker/default/date.rb @@ -80,21 +80,17 @@ def birthday(legacy_min_age = NOT_GIVEN, legacy_max_age = NOT_GIVEN, min_age: 18 # Produces a date in the year and/or month specified. # # @param month [Integer] represents the month of the date - # # @param year [Integer] represents the year of the date - # - # # @return [Date] # # @example - # Faker::Internet.in_date_period #=> # + # Faker::Date.in_date_period #=> Tue, 28 May 2019 # # @example - # Faker::Date.in_date_period(year: 2018, month: 2) #=> # + # Faker::Date.in_date_period(year: 2018, month: 2) #=> Sun, 04 Feb 2018 # # @example - # Faker::Date.in_date_period(month: 2) #=> # - # + # Faker::Date.in_date_period(month: 2) #=> Wed, 06 Feb 2019 # # @faker.version next def in_date_period(month: nil, year: ::Date.today.year)