class

Time

v4.0.2 - Show latest stable - Superclass: Object

No documentation available for this class.

Included modules

  • DateAndTime::Calculations

Constants

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

DATE_FORMATS = {\n:db => '%Y-%m-%d %H:%M:%S',\n:number => '%Y%m%d%H%M%S',\n:nsec => '%Y%m%d%H%M%S%9N',\n:time => '%H:%M',\n:short => '%d %b %H:%M',\n:long => '%B %d, %Y %H:%M',\n:long_ordinal => lambda { |time|\nday_format = ActiveSupport::Inflector.ordinalize(time.day)\ntime.strftime("%B #{day_format}, %Y %H:%M")\n},\n:rfc822 => lambda { |time|\noffset_format = time.formatted_offset(false)\ntime.strftime("%a, %d %b %Y %H:%M:%S #{offset_format}")\n}\n}

Attributes

[RW]zone_default

Files

  • 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/conversions.rb
  • activesupport/lib/active_support/core_ext/time/marshal.rb
  • activesupport/lib/active_support/core_ext/time/zones.rb
  • activesupport/lib/active_support/json/encoding.rb