title: organizing dates in uitableview sections
body: <p>I don't know where to start... 
  I need a <code>TableView</code> to show Information, organized by dates.
  I created a Class "Model" to hold the data...</p>
  
  <pre><code>class Model: NSObject {
  
  var start: Date?
  var str: String?
  
  override init()
  {
  
  }
  
  init(start: Date, str: String) {
  
      self.start = start
      self.str = str
  
  }
  </code></pre>
  
  <p>Creating Elements of that Class</p>
  
  <pre><code>let value1 = Model(start: Date1(), str: string1)
  let value2 = Model(start: Date2(), str: string2)
  </code></pre>
  
  <p>Filling an Array of that Elements:</p>
  
  <pre><code>var array = [Model]()
  array.append(value1, value2)
  </code></pre>
  
  <p>Populating the <code>TableView</code>
  How can I divide the <code>array</code>, for example into months, or workweeks and so on... 
  I want the <code>tableView</code> to organize the data in <code>sections</code> !?    </p>
  
  <pre><code>func numberOfSections(in tableView: UITableView) -&gt; Int {
      return array.count
  }
  
  func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -&gt; UIView? {
      let label = UILabel()
      label.text = "January", Febuary, e.g.
      return label
  }
  
  
  func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return ?
  }
  
  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      let cell = tableView.dequeueReusableCell(withIdentifier: "cell") as! TC_Arbeitszeit
  cell.label.text = ?
  
      return cell
  }
  </code></pre>
  
  <p>Any help is greatly appreciated !</p>