Class SQLTime

Description

formates time between SQL time data-types (DATETIME, DATE, TIME) and UNIX time stamp

Located in /sqltime.php (line 16)


	
			
Method Summary
static float DiffDays (integer $day1, integer $day2)
static string Stamp2DATE (integer $stamp)
static string Stamp2DATETIME (integer $stamp)
static string Stamp2TIME (integer $stamp)
static mixed Time2Stamp (string $datetime, [string $format = ""])
Methods
static method DiffDays (line 139)

Computes difference in days

  • return: number of days
static float DiffDays (integer $day1, integer $day2)
  • integer $day1: unix timestamp
  • integer $day2: unix timestamp
static method Stamp2DATE (line 113)

converts UNIX time stamp to SQL-DATE

  • return: DATE
static string Stamp2DATE (integer $stamp)
  • integer $stamp: unix timestamp
static method Stamp2DATETIME (line 100)

converts UNIX time stamp to SQL-DATETIME

  • return: DATETIME
static string Stamp2DATETIME (integer $stamp)
  • integer $stamp: unix timestamp
static method Stamp2TIME (line 126)

converts UNIX time stamp to SQL-TIME

  • return: TIME
static string Stamp2TIME (integer $stamp)
  • integer $stamp: unix timestamp
static method Time2Stamp (line 27)

converts SQL datetime format to UNIX time stamp or format by Date() if the second parameter is specified

  • return: integer (timestamp) if $format is empty, otherwise formated string
static mixed Time2Stamp (string $datetime, [string $format = ""])
  • string $datetime: DATE, TIME or DATETIME format
  • string $format: directly format the time using Date() function

Documentation generated on Thu, 12 Oct 2006 01:53:46 +0200 by phpDocumentor 1.3.0