Module | Timeliness::Definitions |
In: |
lib/timeliness/definitions.rb
|
US_FORMAT_REGEXP | = | /\Am{1,2}[^m]/ |
FormatNotFound | = | Class.new(StandardError) |
DuplicateFormat | = | Class.new(StandardError) |
date_formats | [RW] | |
datetime_formats | [RW] | |
format_components | [RW] | |
format_tokens | [RW] | |
time_formats | [RW] | |
timezone_mapping | [RW] |
Adds new formats. Must specify format type and can specify a :before option to nominate which format the new formats should be inserted in front on to take higher precedence.
Error is raised if format already exists or if :before format is not found.
Returns format for type and other possible matching format set based on type and value length. Gives minor speed-up by checking string length.