class Faker::Time
def between_dates(from:, to:, period: :all, format: nil)
-
(Time)-
Parameters:
-
format(Symbol) -- The name of a DateTime format to use. -
period(Symbol) -- The time of day, if any. See {TIME_RANGES}. -
to(Date) -- The end of the usable time range. -
from(Date) -- The start of the usable time range.
def between_dates(from:, to:, period: :all, format: nil) date = Faker::Date.between(from: from, to: to) time = date_with_random_time(date, period) time_with_format(time, format) end