# File lib/forgery/forgery/date.rb, line 45 def self.date(options={}) options = {:future => false, :past => false, :min_delta => 0, :max_delta => 7300}.merge(options) #Apply our delta to today ::Date.today + delta(options) end
# File lib/forgery/forgery/date.rb, line 41 def self.day 1 + rand(31) end
# File lib/forgery/forgery/date.rb, line 9 def self.day_of_week(options={}) options = {:abbr => false}.merge(options) if (options[:abbr]) DAYS_ABBR.random.unextend else DAYS.random.unextend end end
# File lib/forgery/forgery/date.rb, line 19 def self.month(options={}) options = {:abbr => false, :numerical => false}.merge(options) if (options[:numerical]) 1 + rand(12) else if (options[:abbr]) MONTHS_ABBR.random.unextend else MONTHS.random.unextend end end end
Generated with the Darkfish Rdoc Generator 2.