 class DaySelector: UIView {
 
   weak var delegate: DaySelectorDelegate?
+
+  var calendar = NSCalendar.autoupdatingCurrentCalendar()
 
   var daysInWeek = 7
   var startDate: NSDate! {

    }
    set(newDate) {
      if let newDate = newDate {
        selectedIndex = newDate.daysFrom(startDate)
      }
    }
  }

  }

  override init(frame: CGRect) {
    startDate = NSDate().dateOnly()
    super.init(frame: frame)
    initializeViews()
  }

  required init?(coder aDecoder: NSCoder) {
    startDate = NSDate().dateOnly()
    super.init(coder: aDecoder)
    initializeViews()
  }
