A library that lets you get the previous day of week from a given date.
import Date_Previous
let date = Date() // E.g 2018-02-13
let previousMonday = date.previous(dayOfWeek: DayOfWeek.Monday) // E.g. 2018-02-12
Date+Previous is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Date+Previous'