Class: View::Date

Inherits:
Formatter show all
Defined in:
lib/view/formatters/date.rb

Overview

Uses I18n to localize a date.

Instance Attribute Summary

Attributes inherited from Formatter

#block, #template, #value

Instance Method Summary (collapse)

Methods inherited from Formatter

#all_options, as, #format!, inherited, #options, skip_blank_formatter, #to_s, type

Instance Method Details

- (Object) format



6
7
8
# File 'lib/view/formatters/date.rb', line 6

def format
  ::I18n.l(value.to_date, options)
end