Skip to content

Instantly share code, notes, and snippets.

@akm
Created April 19, 2010 05:19
Show Gist options
  • Select an option

  • Save akm/370770 to your computer and use it in GitHub Desktop.

Select an option

Save akm/370770 to your computer and use it in GitHub Desktop.
#! /usr/bin/env ruby
require 'date'
STARTED_AT = DateTime.parse("Mon Apr 19 09:30:00 +0900 2010")
len = DateTime.now - STARTED_AT
t = Time.at((len * 24 * 60 * 60).to_i)
puts t.utc.strftime("#{len.to_i} days and %H:%M")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment