Skip to content

Instantly share code, notes, and snippets.

View emkman's full-sized avatar

Ethan Kravitz emkman

View GitHub Profile
@emkman
emkman / time-helpers.swift
Created November 12, 2015 01:49 — forked from maddiesch/time-helpers.swift
Simple implementation of x.hours.ago() and others.
enum FloatToDate {
case Second(Double)
case Minute(Double)
case Hour(Double)
case Day(Double)
case Week(Double)
case Month(Double)
case Year(Double)
func ago() -> NSDate {