Module: DateAndTimeFormatting::ClassMethods

Module | DateAndTimeFormatting::ClassMethods
In: | lib/merb-helpers/date_time_formatting.rb

### Methods

add_format formats reset_formats

### Public Instance methods

add_format(key, format)

Adds a date and time format

Because this operation is not thread safe, you should define custom formats when you load you application. The recommended way to do that, is to use the before_app_loads bootloader.

If you want to add a format at runtime, you will need to use a mutex and synchronize it yourself.

#### Parameters

key<Symbol>: | name of the format
format<Hash>: | time format to use

#### Returns

Hash: | a hash with all formats available

#### Example

      Merb::BootLoader.before_app_loads do
        Date.add_format(:matt, "%H:%M:%S %Y-%m-%d")
      end

— @public

formats()

Lists the date and time formats

#### Returns

Hash: | a hash with all formats available

— @public

reset_formats()

Resets the date and time formats — @private

[Validate]