Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Use my own calendar instance due to swift-5 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cweinberger committed Jun 4, 2019
1 parent 3e699a2 commit 10f5161
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Sugar/Helpers/Date.swift
Expand Up @@ -70,7 +70,7 @@ public extension Date {
hour: Int,
minute: Int,
second: Int,
calendar: Calendar = .current
calendar: Calendar = Calendar(identifier: .gregorian)
) -> Date? {
let dateComponents = calendar.dateComponents([.year, .month, .day], from: self)
guard let date = calendar.date(from: dateComponents) else { return nil }
Expand Down

0 comments on commit 10f5161

Please sign in to comment.