ruby - leap
This commit is contained in:
5
ruby/leap/leap.rb
Normal file
5
ruby/leap/leap.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class Year
|
||||
def self.leap?(year)
|
||||
(year % 4 == 0 and (year % 400 == 0 or year % 100 != 0))
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user