Module Duration::Numeric
In: lib/more/facets/duration.rb

Numeric Extensions for Durations

Methods

day   days   fortnight   fortnights   hour   hours   minute   minutes   month   months   second   seconds   week   weeks   year   years  

Public Instance methods

day()

Alias for days

Converts days into seconds.

fortnight()

Alias for fortnights

hour()

Alias for hours

Converts hours into seconds.

minute()

Alias for minutes

Converts minutes into seconds.

month()

Alias for months

Converts months into seconds. WARNING: This is not exact as it assumes 30 days to a month.

second()

Alias for seconds

Enables the use of time calculations and declarations, like 45.minutes + 2.hours + 4.years. The base unit for all of these Numeric time methods is seconds.

week()

Alias for weeks

Converts weeks into seconds.

year()

Alias for years

Converts years into seconds. WARNING: This is not exact as it assumes 365 days to a year.

         ie. It doesn not account for leap years.

[Validate]