#3: Timepiece 🕙


Timepiece is a library from Naoto Kaneko that makes working with NSDate objects a bit more intuitive.

let now = NSDate()
let theForceAwakens = now + 218.days + 2.hours + 34.minutes

It also aids in quickly parsing dates from or rendering dates to a String:

let judgementDay = "1997-08-29".dateFromFormat("yyyy-MM-dd")"EEEE") // "Thursday"

Comparisons are simplified as well:

if (birthday > 40.years.ago) {

How to Use Timepiece

In our Podfile:

platform :ios, '8.0'

pod 'Timepiece'

In any Swift file:

import Timepiece

More info about Timepiece can be found at