|ReleasedLast Release||Oct 2017|
Maintained by Daniele Margutti.
|Apps WeekApps This Week||2,325|
|Test WeekTests This week||378|
|LOCLines of Code||3,928|
We really ♥ Swift and we think that dates and timezones management should be painless: this is the reason we made SwiftDate, probably the best way to manage date and time in Swift.
Choose SwiftDate for your next project, or migrate over your existing projects—you’ll be happy you did!
★★ Star our github repository to help us! ★★
Here’s a highlight of the main features you can find in SwiftDate:
aDate + 2.weeks + 1.hour or (1.year - 2.hours + 16.minutes).fromNow()
DateInRegionand perform conversions with components and operations!
<,>,==,<=,>=. For example, you can do
aDate1 >= aDate2 or aDate1.isIn(anotherDate,.day)
minutesetc. expressed in your favourite timezone!
120.seconds.in(.minutes) // 2 minutes
Do you like
SwiftDate? I’m also working on several other opensource libraries.
Take a look here:
Code is documented for Xcode, so you can use the built-in documentation panel to learn more about the library.
You can also generate the latest documentation using Jazzy; install Jazzy via
gem install jazzy then, from terminal, move to the
/SwiftDate folder and type
jazzy -c jazzy.yaml. Documentation will be generated in
A complete list of changes for each release is available in the CHANGELOG file.
Currently we need translations for SwiftDate.bundle. Help us with a pull request!
Currently SwiftDate supports:
Make a pull request and add your language!
SwiftDate supports multiple methods for installing the library in a project.
To integrate SwiftDate into your Xcode project using CocoaPods, specify it in your
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' target 'TargetName' do use_frameworks! pod 'SwiftDate', '~> 4.0' end
(use 4.0.13 for Swift 3.0)
Then, run the following command:
$ pod install
Current version is compatible with:
Are you searching for an old (unsupported) SwiftDate version? Check out:
As open source creation any help is welcome!
The code of this library is licensed under MIT License; you can use it in commercial products without any limitation.
The only requirement is to add a line in your Credits/About section with the text below:
Date and Time Management is provided by SwiftDate - http://www.swift-date.com Created by Daniele Margutti and licensed under MIT License.
We are interested in making a list of all projects which use this library. Feel free to open an Issue on GitHub with the name and links of your project; we’ll add it to this site.