Skip to content

Commit

Permalink
return (#114)
Browse files Browse the repository at this point in the history
fixed a return bug
  • Loading branch information
pec1985 committed Mar 20, 2024
1 parent 76d0840 commit 4d72de2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/DateHelper/DateHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public extension Date {
let formatter = Date.cachedDateFormatters.cachedFormatter(format.stringFormat, timeZone: zone, locale: locale, isLenient: isLenient),
let date = formatter.date(from: string) {
self.init(timeInterval: 0, since: date)
return
}
return nil
}
Expand Down

0 comments on commit 4d72de2

Please sign in to comment.