Class: Integer
- Inherits:
-
Object
- Object
- Integer
- Defined in:
- lib/chronos/ruby.rb
Instance Method Summary collapse
-
#leap_year? ⇒ Boolean
whether the given number is a leap year in gregorian calendar system.
Instance Method Details
#leap_year? ⇒ Boolean
whether the given number is a leap year in gregorian calendar system
3 4 5 |
# File 'lib/chronos/ruby.rb', line 3 def leap_year? ((self%4).zero? && !(self%100).zero?) || (self%400).zero? end |