     /// Take you to monday 00:00:00 current week
     ///
     /// - Returns: Date
-    public func startOfWeek(calendar: Calendar = Calendar()) -> Date {
+    public func startOfWeek(calendar: Calendar = Calendar(identifier: .gregorian)) -> Date {
         var components = calendar.dateComponents([.weekOfYear, .yearForWeekOfYear], from: self.startOfDay())
-        components.weekday = .monday.rawValue
+        components.weekday = Weekday.monday.rawValue
         let startOfWeek = calendar.date(from: components)!
         return startOfWeek
     }

    /// End of day
    ///
    /// - Returns: Date
    public func endOfDay(calendar: Calendar = Calendar()) -> Date {
        var components = DateComponents()
        components.day = 1
        let date = calendar.date(byAdding: components, to: self.startOfDay())

    /// Take you to sunday 23:59:59 current week
    ///
    /// - Returns: Date
    public func endOfWeek(calendar: Calendar = Calendar(identifier: .gregorian)) -> Date {
        var components = calendar.dateComponents([.weekOfYear, .yearForWeekOfYear], from: self.endOfDay())
        components.weekday = Weekday.sunday.rawValue
        let startOfWeek = calendar.date(from: components)!
        return startOfWeek.endOfDay()
    }
