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: operator_date_interval_parser.rb
    path of file: ./repos/forest-rails/app/services/forest_liana
    
    the code of the file until where you have to start completion: module ForestLiana
  class OperatorDateIntervalParser
    OPERATOR_PAST = 'past'
    OPERATOR_FUTURE = 'future'
    OPERATOR_TODAY = 'today'
    
    def get_date_filter_for_previous_interval(operator, value)
      return nil unless has_previous_interval? operator

      case operator
      when OPERATOR_TODAY
        return "BETWEEN '#{to_client_timezone(1.day.ago.beginning_of_day)}' AND " +
          "'#{to_client_timezone(1.day.ago.end_of_day)}'"
      when OPERATOR_PREVIOUS_X_DAYS
        ensure_integer_value(value)
        return "BETWEEN '" +
          "#{to_client_timezone((Integer(value) * 2).day.ago.beginning_of_day)}'" +
          " AND '#{to_client_timezone((Integer(value) + 1).day.ago.end_of_day)}'"
      when OPERATOR_PREVIOUS_X_DAYS_TO_DATE
        ensure_integer_value(value)
        return "BETWEEN '" +
          "#{to_client_timezone(((Integer(value) * 2) - 1).day.ago.beginning_of_day)}'" +
          " AND '#{to_client_timezone(Integer(value).day.ago)}'"
      end