Skip to content

Commit

Permalink
Merge branch 'hotfix/5.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
malcommac committed Jul 5, 2018
2 parents 744a8ce + 757bb82 commit 06ec743
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Documentation/10.Upgrading_SwiftDate4.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SwiftDate 5.x is a complete rewrite of the library. While it introduces several
**If you miss a features or you are interested in a new one create a new Issue.**

### Important Note about Default Region
In SwiftDate 4.x the default region is automatically set to local regiomn, where all attributes are set automatically to the current's device's locale, timezone and calendar.
In SwiftDate 4.x the default region is automatically set to local region, where all attributes are set automatically to the current's device's locale, timezone and calendar.

**Since SwiftDate 5, in order to be more comply with `Date`'s default behaviour, the default region's timezone is set to GMT+0 (UTC)**.

Expand Down Expand Up @@ -62,4 +62,4 @@ func application(_ application: UIApplication, didFinishLaunchingWithOptions lau

--

[**Index**: Table Of Contents](#Index.md)
[**Index**: Table Of Contents](#Index.md)
4 changes: 2 additions & 2 deletions Sources/SwiftDate/Date/Date+Compare.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public extension Date {
/// - granularity: smallest unit that must, along with all larger units, be less for the given dates
/// - Returns: Boolean
public func isBeforeDate(_ refDate: Date, orEqual: Bool = false, granularity: Calendar.Component) -> Bool {
return self.inDefaultRegion().isBeforeDate(refDate.inDefaultRegion(), granularity: granularity)
return self.inDefaultRegion().isBeforeDate(refDate.inDefaultRegion(), orEqual: orEqual, granularity: granularity)
}

/// Compares whether the receiver is after `date` based on their components down to a given unit granularity.
Expand All @@ -63,7 +63,7 @@ public extension Date {
/// - granularity: Smallest unit that must, along with all larger units, be greater for the given dates.
/// - Returns: Boolean
public func isAfterDate(_ refDate: Date, orEqual: Bool = false, granularity: Calendar.Component) -> Bool {
return self.inDefaultRegion().isAfterDate(refDate.inDefaultRegion(), granularity: granularity)
return self.inDefaultRegion().isAfterDate(refDate.inDefaultRegion(), orEqual: orEqual, granularity: granularity)
}

/// Return true if receiver data is contained in the range specified by two dates.
Expand Down
2 changes: 1 addition & 1 deletion SwiftDate.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SwiftDate"
s.version = "5.0.0"
s.version = "5.0.1"
s.summary = "The best way to deal with Dates & Time Zones in Swift"
s.homepage = "https://github.com/malcommac/SwiftDate.git"
s.license = { :type => "MIT", :file => "LICENSE" }
Expand Down

0 comments on commit 06ec743

Please sign in to comment.