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: usergroup.rb
    path of file: ./repos/on_ruby/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class Usergroup
  DELIMITER_TIME    = ':'
  DELIMITER_DATE    = ' '
  NUMBERS           = %w[first second third fourth
    
  def parse_recurring_date(date)
    number, day, = recurring.split(DELIMITER_DATE)
    day = DAYS_INTO_WEEK[day.to_sym] + 1
    if number == 'last'
      d = date.at_end_of_month.change(hour: 0, minute: 0, second: 0)
      d - ((d.wday - day) % 7).days
    else
      d = date.at_beginning_of_month
      num = NUMBERS.index(number)

      if d.wday > day
        d + ((num + 1) * 7 + day - d.wday).days
      else
        d + (num * 7 + day - d.wday).days
      end