You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: monthly_interval.rb
    path of file: ./repos/ice_cube/lib/ice_cube/validations
    
    the code of the file until where you have to start completion: module IceCube
  module Validations::Month
    
      def validate(step_time, start_time)
        t0, t1 = start_time, step_time
        months = (t1.month - t0.month) +
          (t1.year - t0.year) * 12
        offset = (months % interval).nonzero?
        interval - offset if offset
      end