Class Integer
In: lib/chronos/ruby.rb
Parent: Object

Methods

Public Instance methods

whether the given number is a leap year in gregorian calendar system

[Source]

   # File lib/chronos/ruby.rb, line 3
3:   def leap_year?
4:     ((self%4).zero? && !(self%100).zero?) || (self%400).zero?
5:   end

[Validate]