Class: RandomPerson::Date

Inherits:
Date
  • Object
show all
Defined in:
lib/randomperson/ext/date.rb

Class Method Summary collapse

Class Method Details

.days_in_month(year, month) ⇒ Integer

Convenience function

Parameters:

  • year (Integer)
  • month (Integer)

Returns:

  • (Integer)


11
12
13
# File 'lib/randomperson/ext/date.rb', line 11

def self.days_in_month( year, month ) 
  ::Date.civil(year, month, -1).day 
end