TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Sep 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by NgocPhan.
To run the example project, clone the repo, and run pod install
from the Example directory first.
SDDateHelper is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SDDateHelper', :git => https://github.com/pdn1905/SDDateHelper
How to use:
Import SMDDateHelper
Math with Date:
let today = Date() // 21-09-2017
let nextDay = today + 1.day => 22-09-2017 // same with minutes, hours, months, years..
Compare between Dates:
let today = Date() // 21-09-2017
let nextDay = today + 1.day => 22-09-2017
let bool = today < nextDay => return true
Get Internet time:
SDTime.getNextworkTime()
let currentInternetTime = SDTime().now => return current network Time
NgocPhan
SDDateHelper is available under the MIT license. See the LICENSE file for more info.