add-memberalign-toparrow-leftarrow-rightbellblockcalendarcamerachatchevron-leftchevron-rightchevron-small-downchevron-upcircle-with-crosscomposecrossfacebookflagfolderglobegoogleimagesinstagramkeylocation-pinmedalmoremuplabelShape 3 + Rectangle 1pagepersonpluspollsImported LayersImported LayersImported LayersshieldstartwitterwinbackClosewinbackCompletewinbackDiscountyahoo

[ANN] useful_duration 0.0.2

From: Stephen S.
Sent on: Sunday, July 7, 2013 9:15 AM
Finally - a useful way of measuring time in your applications.

Install and require the gem manually or through bundler.


    =>[masked]:25:56 -0400

    =>[masked]:10:45 -0400

  "I regret I have but #{86400.to_f/1.doctor_zhivago} in a day" 
    => "I regret I have but[masked] in a day" 

New In This Version

A DSL nice DSL to define custom durrations. (prezjordan)

require 'useful_duration'

include UsefulDuration

useful_duration :fortnights,[masked]

1.fortnight.from_now =>[masked]:47:37 -0400


This requires ActiveSupport to play nicely with ActiveSupport duration
It was written against[masked] and hasn't been regression tested against other versions.


People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy