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

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

import Foundation
import Vapor

extension Date {
    // MARK: Errors
