Skip to Content Skip to Search
Methods
R

Class Public methods

register(name, format)

Registers a new date format for formatting Time instances. See Time#to_fs for examples of 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.

# File activesupport/lib/active_support/time_formats.rb, line 35
def self.register(name, format)
  @list = @list.merge(name => format).freeze
end