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: gregorian.rb
    path of file: ./repos/hijri/lib/hijri
    
    the code of the file until where you have to start completion: class Date
  def to_hijri(adjust=0)
    Hijri::Date.new(*Hijri::Converter.greo_
    
  def to_abs
    @d = self.day
    @m = self.month - 1
    @m.downto(1) do |m|
      @d += last_day_of_gregorian_month(@m, year)
    end
    return (@d + 365 * (year - 1) + (year -1) / 4.0 - (year - 1) / 100.0 + (year - 1) / 400.0).to_i
  end