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’
97 98 99 |
# File 'lib/zena/use/i18n.rb', line 97 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’
102 103 104 |
# File 'lib/zena/use/i18n.rb', line 102 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’
87 88 89 |
# File 'lib/zena/use/i18n.rb', line 87 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’
107 108 109 |
# File 'lib/zena/use/i18n.rb', line 107 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’
92 93 94 |
# File 'lib/zena/use/i18n.rb', line 92 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.
112 113 114 |
# File 'lib/zena/use/i18n.rb', line 112 def tformat_date(thedate, fmt) format_date(thedate, :format => _(fmt)) end |