Is there an easy way to determine if a year is a leap year?
Date#leap?
now = DateTime.now flag = Date.leap?( now.year )
e.g.
Date.leap?( 2018 ) # => false Date.leap?( 2016 ) # => true