class TZInfo::DataSources::TransitionsDataTimezoneInfo

def transitions_up_to(to_timestamp, from_timestamp = nil)

(see DataTimezoneInfo#transitions_up_to)
def transitions_up_to(to_timestamp, from_timestamp = nil)
  raise ArgumentError, 'to_timestamp must be specified' unless to_timestamp
  raise ArgumentError, 'to_timestamp must have a specified utc_offset' unless to_timestamp.utc_offset
  if from_timestamp
    raise ArgumentError, 'from_timestamp must have a specified utc_offset' unless from_timestamp.utc_offset
    raise ArgumentError, 'to_timestamp must be greater than from_timestamp' if to_timestamp <= from_timestamp
  end
  if from_timestamp
    from_index = find_minimum_transition {|t| transition_on_or_after_timestamp?(t, from_timestamp) }
    return [] unless from_index
  else
    from_index = 0
  end
  to_index = find_minimum_transition {|t| transition_on_or_after_timestamp?(t, to_timestamp) }
  if to_index
    return [] if to_index < 1
    to_index -= 1
  else
    to_index = -1
  end
  @transitions[from_index..to_index]
end