Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
strftime « Time « Ruby
Ruby
Time
strftime
1.
Time#strftime directives
2.
Time.gm(2006).strftime('The year is %Y!')
3.
Format time as '%D'
4.
Format time as '%d/%m/%y'
5.
Format time as '%m/%d/%Y'
6.
Format time as '%m-%d-%Y %H:%M:%S %Z'
7.
Format time as '%m-%d-%Y %I:%M:%S %p'
8.
Format time as '%A, %B %d, %Y'
9.
strftime("%U") and strftime("%W")