ActiveSupport::Duration
Constants
PART_ORDER = {:years, :months, :weeks, :days, :hours, :minutes, :seconds}
SECONDS_PER_PART = {
seconds: 1_i64,
minutes: 60_i64,
hours: 3600_i64,
days: 86400_i64,
weeks: 604800_i64,
months: 2592000_i64,
years: 31536000_i64,
}
Constructors
Class methods
Instance methods
+(other : Duration) : Duration
Source-(other : Duration) : Duration
Sourceago
Sourcecalendar_months
Sourcefixed_seconds
Sourcefrom_now
Sourcein_milliseconds
Sourceinspect
Returns an unambiguous and information-rich string representation of this object, typically intended for developers.
This method should usually not be overridden. It delegates to
#inspect(IO) which can be overridden for custom implementations.
Also see #to_s.
parts
since
Sourceto_i
Sourceto_span
Sourceuntil
Sourcevalue