skater coder

angela chng – Ruby on Rails / PHP web developer & skater girl in Singapore

  • blogabout stuff
  • aboutthis website
  • contactdrop a message

September 11, 2008
Posted by roadburn

Ruby strftime Reference

%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.

http://snippets.dzone.com/tag/strftime#post1643

http://sg.php.net/strftime

1 Comment

Posted Under Rails

1 Comments

ImNotQuiteJack
January 29, 2009

Awesome! Here are some more helpful codes:

%e – day of the month without leading zeros
%l – hour in 12-hour format, without a leading zero

Leave a comment

* = Required

  • CATEGORIES
    • Coding Tips
    • ExtJS 4
    • Food
    • Portfolio
    • Rails
    • Sharepoint
    • Ubuntu
    • Wordpress

  • TAGS
    activities AD ADAM ajax architecture authentication bluehost books custom application custom form date design disk partition ECTS event id eventid moss forum guid hotfix iis imap keberos list id lists masterpage moss mysite profiles Rails rails 2.0 reporting services ruby Sharepoint sharepoint 2007 site templates site usage sql server 2005 time updates vhd virtual pc visual studio webparts workflow wss

Subscribe via RSS