Flowdock
method

time_tag

Importance_1
v3.2.1 - Show latest stable - 0 notes - Class: ActionView::Helpers::DateHelper
time_tag(date_or_time, *args) public

Returns an html time tag for the given date or time.

Examples

time_tag Date.today  # =>
  <time datetime="2010-11-04">November 04, 2010</time>
time_tag Time.now  # =>
  <time datetime="2010-11-04T17:55:45+01:00">November 04, 2010 17:55</time>
time_tag Date.yesterday, 'Yesterday'  # =>
  <time datetime="2010-11-03">Yesterday</time>
time_tag Date.today, :pubdate => true  # =>
  <time datetime="2010-11-04" pubdate="pubdate">November 04, 2010</time>
Show source
Register or log in to add new notes.