Class: TwitterCldr::Formatters::DateFormatter
- Inherits:
-
DateTimeFormatter
- Object
- Base
- DateTimeFormatter
- TwitterCldr::Formatters::DateFormatter
- Defined in:
- lib/twitter_cldr/formatters/calendars/date_formatter.rb
Constant Summary
Constants inherited from DateTimeFormatter
TwitterCldr::Formatters::DateTimeFormatter::METHODS, TwitterCldr::Formatters::DateTimeFormatter::WEEKDAY_KEYS
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ DateFormatter
constructor
A new instance of DateFormatter.
Methods inherited from DateTimeFormatter
#additional_format_selector, additional_formats_for, #result_for_token
Methods inherited from Base
Constructor Details
#initialize(options = {}) ⇒ DateFormatter
Returns a new instance of DateFormatter.
9 10 11 12 13 14 15 16 |
# File 'lib/twitter_cldr/formatters/calendars/date_formatter.rb', line 9 def initialize( = {}) locale = extract_locale() cache_key = TwitterCldr::Utils.compute_cache_key("date", locale, [:calendar_type]) @tokenizer = tokenizer_cache[cache_key] ||= TwitterCldr::Tokenizers::DateTokenizer.new( :locale => locale, :calendar_type => [:calendar_type] ) end |