ISO 8601 date format for microformats
strftime('%Y-%m-%dT%H:%M:%S%z')
How to use:
<abbr class="dtstart" title="<%= event.start_date.strftime('%Y-%m-%dT%H:%M:%S%z') %>"><%= event.start_date.to_s(:long) %></abbr>
11305 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
strftime('%Y-%m-%dT%H:%M:%S%z')
<abbr class="dtstart" title="<%= event.start_date.strftime('%Y-%m-%dT%H:%M:%S%z') %>"><%= event.start_date.to_s(:long) %></abbr>
Date.today.strftime('%b %d, %Y').gsub(/ 0(\d\D)/, ' \1')
>>> from e32db import format_time >>> from time import * >>> t = time() >>> >>> format_time(t) # for Symbian SQL u'06/03/2006 23:26:35' >>> strftime('%d/%m/%Y %H:%M:%S') # like above '06/03/2006 23:26:39' >>> ctime() 'Mon Mar 06 23:26:49 2006' >>> strftime("%a, %d %b %Y %H:%M:%S +0000") # email RFC 'Mon, 06 Mar 2006 23:26:59 +0000'
%a weekday name. %A weekday name (full). %b month name. %B month name (full). %c date and time (locale) %d day of month [01,31]. %H hour [00,23]. %I hour [01,12]. %j day of year [001,366]. %m month [01,12]. %M minute [00,59]. %p AM or PM %S Second [00,61] %U week of year (Sunday)[00,53]. w weekday [0(Sunday),6]. W week of year (Monday)[00,53]. x date (locale). %X time (locale). %y year [00,99]. %Y year [2000]. %Z timezone name.
xml.pubDate(p.updated_at.strftime("%a, %d %b %Y %H:%M:%S %z"))
strftime("%a, %d %b %Y %H:%M:%S %z")