Skip to content

hemangshah/Datify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Datify πŸ•›

Easypeasy date functions.

License Platform Swift 3.x MadeWithLove Awesome-Swift

Usage:

print("now:                   \(Date.init())")
print("8 days later:          \(8.days.fromNow)")
print("2 weeks before:        \(2.weeks.ago)")
print("5 days, 3 month later: \((5.days + 3.months).fromNow)")

Output:

now:                   2017-06-06 10:42:23 +0000
8 days later:          2017-06-14 10:42:23 +0000
2 weeks before:        2017-05-23 10:42:23 +0000
5 days, 3 month later: 2017-09-11 10:42:23 +0000

Note:

This library was originally written as SwiftDateTimeExtensions but it was too old for new Swift version and needed improvements.

I am also planning to add more features to this class in future thus created a separate repo instead a fork.

Releases

No releases published

Packages

No packages published

Languages