Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
update for Xcode 8 v2
Browse files Browse the repository at this point in the history
  • Loading branch information
kgn committed Jul 19, 2016
1 parent d0df01d commit 0fd0789
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions NSDate+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func NSDateTimeAgoLocalizedStrings(_ key: String) -> String {
resourcePath = frameworkBundle.resourcePath
} else {
// Load from Main Bundle
resourcePath = Bundle.main().resourcePath
resourcePath = Bundle.main.resourcePath
}

if resourcePath == nil {
Expand Down Expand Up @@ -138,7 +138,7 @@ extension Date {
}

private func dateComponents() -> DateComponents {
let calander = Calendar.current()
let calander = Calendar.current
return calander.components([.second, .minute, .hour, .day, .month, .year], from: self, to: Date(), options: [])
}

Expand All @@ -148,7 +148,7 @@ extension Date {
}

private func getLocaleFormatUnderscores(withValue value: Double) -> String {
guard let localeCode = Locale.preferredLanguages().first else {
guard let localeCode = Locale.preferredLanguages.first else {
return ""
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/NSDateTimeAgoTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class NSDateTimeAgoTests: XCTestCase {
}

func dateForComponents(block: (inout components: DateComponents) -> Void) -> Date? {
let calander = Calendar.current()
let calander = Calendar.current
var components = DateComponents()
block(components: &components)
return calander.date(byAdding: components, to: Date(), options: [])
Expand Down

0 comments on commit 0fd0789

Please sign in to comment.