     /// Start of month
     ///
     /// - Returns: Date
-    public func startOfMonth(calendar: Calendar = Calendar()) -> Date {
+    public func startOfMonth(calendar: Calendar = Calendar(identifier: .gregorian)) -> Date {
         let unitFlags = Set<Calendar.Component>([.year, .month])
         let components = calendar.dateComponents(unitFlags, from: self)
         return calendar.date(from: components)!

import Foundation

extension Date {
    // MARK: Errors

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