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