A set of Date extensions, written in Swift 🔶. Inspired by CupertinoYankee and DateTools
- beginningOfDay/Month, endOfDay/Month
- day/weekDay/month/year Int numbers
- isEarlier/isLater/isEqualTo other date
- add and subtract minutes/hours/days/months
- minutes/daysFrom other date
- iOS 8.0+
- Xcode 8
You can use CocoaPods to install TaklDateTools
by adding it to your Podfile
:
platform :ios, '8.0'
use_frameworks!
pod 'TaklDateTools', :git => 'https://github.com/TaklApp/TaklDateTools.git'
To get the full benefits import TaklDateTools
wherever you import UIKit
import UIKit
import TaklDateTools
- Download and drop
Takl+Date.swift
in your project. - Congratulations!
var date = Date(timeIntervalSince1970: 0)
var date2 = Date(timeIntervalSince1970: 120)
date2.minutesFrom(date: date) //2
We would love for you to contribute to Takl+Date.swift, check the LICENSE
file for more info.
Takl – @takl_app
Distributed under the MIT license. See LICENSE
for more information.