Module: Zena::Use::I18n::FormatDate
- Included in:
- ViewMethods
- Defined in:
- lib/zena/use/i18n.rb
Instance Method Summary collapse
-
#full_date(adate) ⇒ Object
display the time with the format provided by the translation of ‘full_date’.
-
#long_date(adate) ⇒ Object
display the time with the format provided by the translation of ‘long_date’.
-
#long_time(atime) ⇒ Object
display the time with the format provided by the translation of ‘long_time’.
-
#short_date(adate) ⇒ Object
display the time with the format provided by the translation of ‘short_date’.
-
#short_time(atime) ⇒ Object
display the time with the format provided by the translation of ‘short_time’.
-
#tformat_date(thedate, fmt) ⇒ Object
format a date with the given format.
Instance Method Details
#full_date(adate) ⇒ Object
display the time with the format provided by the translation of ‘full_date’
86 87 88 |
# File 'lib/zena/use/i18n.rb', line 86 def full_date(adate) format_date(adate, :format => _("full_date")) end |
#long_date(adate) ⇒ Object
display the time with the format provided by the translation of ‘long_date’
91 92 93 |
# File 'lib/zena/use/i18n.rb', line 91 def long_date(adate) format_date(adate, :format => _("long_date")) end |
#long_time(atime) ⇒ Object
display the time with the format provided by the translation of ‘long_time’
76 77 78 |
# File 'lib/zena/use/i18n.rb', line 76 def long_time(atime) format_date(atime, :format => _("long_time")) end |
#short_date(adate) ⇒ Object
display the time with the format provided by the translation of ‘short_date’
96 97 98 |
# File 'lib/zena/use/i18n.rb', line 96 def short_date(adate) format_date(adate, :format => _("short_date")) end |
#short_time(atime) ⇒ Object
display the time with the format provided by the translation of ‘short_time’
81 82 83 |
# File 'lib/zena/use/i18n.rb', line 81 def short_time(atime) format_date(atime, :format => _("short_time")) end |
#tformat_date(thedate, fmt) ⇒ Object
format a date with the given format. Translate month and day names.
101 102 103 |
# File 'lib/zena/use/i18n.rb', line 101 def tformat_date(thedate, fmt) format_date(thedate, :format => _(fmt)) end |