Ruby on Rails
PhpDateAndTimeFunctions

Date and Time Functions

Date and time functionality is built into Ruby, with some additional helpers from Rails.

See also Ruby-Doc.org

Functions

checkdate—Validate a Gregorian date
date_default_timezone_get— Gets the default timezone used by all date/time functions in a script
date_default_timezone_set— Sets the default timezone used by all date/time functions in a script
date_sunrise— Returns time of sunrise for a given day and location
date_sunset— Returns time of sunset for a given day and location
date—Format a local time/date
getdate—Get date/time information
gettimeofday—Get current time
gmdate—Format a GMT/UTC date/time
gmmktime—Get Unix timestamp for a GMT date
gmstrftime—Format a GMT/UTC time/date according to locale settings
idate—Format a local time/date as integer
localtime—Get the local time
microtime—Return current Unix timestamp with microseconds
mktime—Get Unix timestamp for a date
strftime—Format a local time/date according to locale settings
strptime— Parse a time/date generated with strftime()
strtotime—Parse about any English textual datetime description into a Unix timestamp
time—Return current Unix timestamp