Skip to content

Commit

Permalink
daily quote retrieval updated
Browse files Browse the repository at this point in the history
  • Loading branch information
kmikiy committed May 29, 2017
1 parent 9ba3f92 commit eebb2da
Show file tree
Hide file tree
Showing 71 changed files with 8,888 additions and 257 deletions.
8 changes: 8 additions & 0 deletions DDKQCore/Quote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import Foundation
import Alamofire
import SwiftyJSON
import SwiftDate

public class Quotes {
public static func getQuotes( completion: @escaping (_ quotes: [String])->()) {
Expand All @@ -23,5 +24,12 @@ public class Quotes {

}
}

public static var daysSinceLastQuote: Float64 {
let lastQuoteDay = UserPreferences.lastQuoteDay
let now = Date().startOfDay
let delta = now.timeIntervalSince(lastQuoteDay.startOfDay)
return Double(delta / 60 / 60 / 24)
}
}

1 change: 1 addition & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ target 'DDKQCore' do
# Pods for DDKQCore
pod 'Alamofire', '~> 4.4'
pod 'SwiftyJSON'
pod 'SwiftDate', '~> 4.0'

end

Expand Down
5 changes: 4 additions & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
PODS:
- Alamofire (4.4.0)
- SwiftDate (4.1.2)
- SwiftyJSON (3.1.4)

DEPENDENCIES:
- Alamofire (~> 4.4)
- SwiftDate (~> 4.0)
- SwiftyJSON

SPEC CHECKSUMS:
Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d
SwiftDate: 2dfdebd4f67ae71c9c3e2413ee3c56947f302858
SwiftyJSON: c2842d878f95482ffceec5709abc3d05680c0220

PODFILE CHECKSUM: 098b339025ac32f74aff8f90ea27168c4749a087
PODFILE CHECKSUM: 2dcd6c367e35a381d9e088bf8a14a6d68c2657c3

COCOAPODS: 1.2.0
5 changes: 4 additions & 1 deletion Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

776 changes: 537 additions & 239 deletions Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions Pods/SwiftDate/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

183 changes: 183 additions & 0 deletions Pods/SwiftDate/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit eebb2da

Please sign in to comment.