DateRelativeQuantity.swift 434 B

12345678910111213141516171819202122
  1. //
  2. // DateRelativeQuantity.swift
  3. // LoopTestingKit
  4. //
  5. // Created by Michael Pangburn on 4/21/19.
  6. // Copyright © 2019 LoopKit Authors. All rights reserved.
  7. //
  8. import Foundation
  9. protocol DateRelativeQuantity {
  10. var dateOffset: TimeInterval { get set }
  11. mutating func shift(by offset: TimeInterval)
  12. }
  13. extension DateRelativeQuantity {
  14. mutating func shift(by offset: TimeInterval) {
  15. dateOffset += offset
  16. }
  17. }