def row_to_day(i, j)
        starting_wday = @day_start.wday - 1
        starting_wday = 6 if starting_wday < 0

        # day without taking into account the :week_start so every 1st
        # of the month is on a :monday on case [0, 0]
        base = (i * 7) + j

        # we add the :week_start
        base += Date::DAYS_INTO_WEEK[@options[:week_start]]

        # we adjust with the starting day of the month
        base -= starting_wday
        base += 1

        return nil if base < 1 || base > days_in_month(@day_start)

        base
      end
def row_to_day(i, j)
        starting_wday = @day_start.wday - 1
        starting_wday = 6 if starting_wday < 0

        # day without taking into account the :week_start so every 1st
        # of the month is on a :monday on case [0, 0]
        base = (i * 7) + j

        # we add the :week_start
        base += Date::DAYS_INTO_WEEK[@options[:week_start]]

        # we adjust with the starting day of the month
        base -= starting_wday
        base += 1

        return nil if base < 1 || base > days_in_month(@day_start)

        base
      end
Get the month's day corresponding to a row. Nil is returned if none.