class Fugit::Duration
def to_sec
365 days, ...
Warning: this is an "approximation", months are 30 days and years are
def to_sec KEYS.inject(0) { |s, (k, a)| v = @h[k]; next s unless v; s += v * a[:s] } end
def to_sec KEYS.inject(0) { |s, (k, a)| v = @h[k]; next s unless v; s += v * a[:s] } end