APIdock / Ruby on Rails
/
Browse About
method

ago

v2.1.0 - Show latest stable - Class: ActiveSupport::CoreExtensions::Time::Calculations
ago(seconds)
public

Returns a new Time representing the time a number of seconds ago, this is basically a wrapper around the Numeric extension

# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 93
        def ago(seconds)
          self.since(-seconds)
        end

Related methods

  • Instance methods
  • advance
  • ago
  • at_beginning_of_day
  • at_beginning_of_month
  • at_beginning_of_quarter
  • at_beginning_of_week
  • at_beginning_of_year
  • at_end_of_month
  • at_end_of_quarter
  • at_end_of_week
  • at_end_of_year
  • at_midnight
  • beginning_of_day
  • beginning_of_month
  • beginning_of_quarter
  • beginning_of_week
  • beginning_of_year
  • change
  • compare_with_coercion
  • end_of_day
  • end_of_month
  • end_of_quarter
  • end_of_week
  • end_of_year
  • in
  • last_month
  • last_year
  • midnight
  • minus_with_coercion
  • minus_with_duration
  • monday
  • months_ago
  • months_since
  • next_month
  • next_week
  • next_year
  • plus_with_duration
  • seconds_since_midnight
  • since
  • tomorrow
  • years_ago
  • years_since
  • yesterday
  • Class methods
  • included
APIdock API Documentation Browser

Swarmia gives you actionable DORA metrics for your engineering team.

© 2026 APIdock