Skip to content

Instantly share code, notes, and snippets.

View asmodis's full-sized avatar

Gunther Diemant asmodis

View GitHub Profile
@asmodis
asmodis / average_time_calculator.rb
Created October 8, 2009 21:11
Solution for RPCFN #2
require "time"
module AverageTimeCalculator
SecondsPerDay = 86400
Noon = 12
#Calculates the average of the given times.
#Parameter times is supposed to be an array of strings, each string with format HH:MM(am|pm)
#
#*Examples*: