class

Time

v8.0.0 - Show latest stable - Superclass: Object

No documentation available for this class.

Included modules

  • DateAndTime::Calculations
  • DateAndTime::Compatibility
  • DateAndTime::Zones

Constants

COMMON_YEAR_DAYS_IN_MONTH = [nil, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

DATE_FORMATS = {\ndb: "%Y-%m-%d %H:%M:%S",\ninspect: "%Y-%m-%d %H:%M:%S.%9N %z",\nnumber: "%Y%m%d%H%M%S",\nnsec: "%Y%m%d%H%M%S%9N",\nusec: "%Y%m%d%H%M%S%6N",\ntime: "%H:%M",\nshort: "%d %b %H:%M",\nlong: "%B %d, %Y %H:%M",\nlong_ordinal: lambda { |time|\nday_format = ActiveSupport::Inflector.ordinalize(time.day)\ntime.strftime("%B #{day_format}, %Y %H:%M")\n},\nrfc822: lambda { |time|\noffset_format = time.formatted_offset(false)\ntime.strftime("%a, %d %b %Y %H:%M:%S #{offset_format}")\n},\nrfc2822: lambda { |time| time.rfc2822 },\niso8601: lambda { |time| time.iso8601 }\n}

Attributes

[RW]zone_default

Files

  • activesupport/lib/active_support/core_ext/object/blank.rb
  • activesupport/lib/active_support/core_ext/object/json.rb
  • activesupport/lib/active_support/core_ext/time/acts_like.rb
  • activesupport/lib/active_support/core_ext/time/calculations.rb
  • activesupport/lib/active_support/core_ext/time/compatibility.rb
  • activesupport/lib/active_support/core_ext/time/conversions.rb
  • activesupport/lib/active_support/core_ext/time/zones.rb