SGL_DateProvides various date formatting methods.
Located in /SGL/Date.php (line 47)
string
getYearFormOptions
([string $selected = ''], [boolean $asc = true], [ $totalYears = 5], int $number)
string
showDateSelector
(array $aDate, string $elementName, [boolean $bShowTime = true], [bool $asc = true], [int $years = 5])
static getTime (line 60)
Returns current time in YYYY-MM-DD HH:MM:SS format.
GMT format is best for logging system events, otherwise locale offset will be most helpful to users.
arrayToString (line 76)
Converts date array into MySQL datetime format.
format (line 160)
Converts date (may be in the ISO, TIMESTAMP or UNIXTIME format) into locale dependent form.
formatPretty (line 126)
Converts date (may be in the ISO, TIMESTAMP or UNIXTIME format) into "Mar 31, 2003 18:29".
getDateFormat (line 195)
Gets appropriate date format
getDayFormOptions (line 222)
Generates a select of day values.
getHourFormOptions (line 312)
Generates a select of hour values.
getMinSecOptions (line 336)
Generates a select of minute/second values.
getMonthFormOptions (line 245)
Generates a select of month values.
getYearFormOptions (line 277)
Generates a select of year values.
showDateSelector (line 380)
Generates date/time selector widget.
usage: $timestamp=mktime(); $day = date('d', $timestamp); $month = date('m', $timestamp); $year = date('Y', $timestamp); $hour = date('H', $timestamp); $minute = date('i', $timestamp); $second = date('s', $timestamp);
$aDate = array( 'day' => $day, 'month' => $month, 'year' => $year, 'hour' => $hour, 'minute' => $minute, 'second' => $second); print showDateSelector($aDate, 'myForm', false);
stringToArray (line 103)
Converts date into date array.
Documentation generated on Tue, 23 Feb 2010 18:14:29 +0000 by phpDocumentor 1.4.3