Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow passing a string to specific Faker::Date methods. #2029

Merged
merged 1 commit into from
Jun 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/faker/default/date.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ class << self
##
# Produce a random date between two dates.
#
# @param from [Date] The start of the usable date range.
# @param to [Date] The end of the usable date range.
# @param from [Date, String] The start of the usable date range.
# @param to [Date, String] The end of the usable date range.
# @return [Date]
#
# @example
Expand All @@ -32,9 +32,9 @@ def between(legacy_from = NOT_GIVEN, legacy_to = NOT_GIVEN, from:, to:)
##
# Produce a random date between two dates.
#
# @param from [Date] The start of the usable date range.
# @param to [Date] The end of the usable date range.
# @param excepted [Date] A date to exclude.
# @param from [Date, String] The start of the usable date range.
# @param to [Date, String] The end of the usable date range.
# @param excepted [Date, String] A date to exclude.
# @return [Date]
#
# @example
Expand Down