Method: Lazier::DateTime::ClassMethods#custom_format

Defined in:
lib/lazier/datetime.rb

#custom_format(key) ⇒ String

Lookups a custom datetime format.

Parameters:

  • key (Symbol)

    The name of the format to search.

Returns:

  • (String)

    The format or the name itself (if the format has not been found).

See Also:



139
140
141
# File 'lib/lazier/datetime.rb', line 139

def custom_format(key)
  ::Lazier.settings.date_formats.fetch(key, key)
end