SDDateHelper 0.1.0

SDDateHelper 0.1.0

测试已测试
语言语言 swiftSwift
许可证 MIT
发布日期上次发布2017年9月
swiftSwift 版本3.0
SPM支持 SPM

NgocPhan 维护。



  • 作者
  • pdn1905

SDDateHelper

示例

要运行示例项目,首先克隆仓库,然后从 Example 目录运行 pod install

要求

安装

SDDateHelper 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile:

pod 'SDDateHelper', :git => https://github.com/pdn1905/SDDateHelper

使用方法

Import SMDDateHelper

日期的数学运算

let today = Date() // 21-09-2017
let nextDay = today + 1.day => 22-09-2017 // same with minutes, hours, months, years..

日期之间的比较

let today = Date() // 21-09-2017
let nextDay = today + 1.day => 22-09-2017 
let bool = today < nextDay => return true

获取网络时间

SDTime.getNextworkTime()

let currentInternetTime = SDTime().now => return current network Time

作者

NgocPhan😻, [email protected]

许可证

SDDateHelper 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。