class method
self.register
Ruby on Rails edge
Since edgeSignature
self.register(name, format)
Registers a new date format for formatting Date instances. See Date::DATE_FORMATS for built-in formats. Use the format name as the name and either a strftime string or Proc instance that takes a date argument as the value.
Parameters
-
namereq -
formatreq
Source
# File activesupport/lib/active_support/date_formats.rb, line 33
def self.register(name, format)
@list = @list.merge(name => format).freeze
end
Defined in activesupport/lib/active_support/date_formats.rb line 33
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::DateFormats