Definition at line 63 of file Date.php.
◆ date2Mdbstamp()
MDB2_Date::date2Mdbstamp |
( |
|
$hour = null , |
|
|
|
$minute = null , |
|
|
|
$second = null , |
|
|
|
$month = null , |
|
|
|
$day = null , |
|
|
|
$year = null |
|
) |
| |
convert a date into a MDB2 timestamp
- Parameters
-
int | hour of the date |
int | minute of the date |
int | second of the date |
int | month of the date |
int | day of the date |
int | year of the date |
- Returns
- string a valid MDB2 timestamp @access public
Definition at line 122 of file Date.php.
124 {
126 }
unix2Mdbstamp($unix_timestamp)
convert a unix timestamp into a MDB2 timestamp
References unix2Mdbstamp().
◆ mdbNow()
return the current datetime
- Returns
- string current datetime in the MDB2 format @access public
Definition at line 73 of file Date.php.
74 {
75 return date(
'Y-m-d H:i:s');
76 }
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
References date.
◆ mdbstamp2Date()
MDB2_Date::mdbstamp2Date |
( |
|
$mdb_timestamp | ) |
|
convert a MDB2 timestamp into an array containing all values necessary to pass to php's date() function
- Parameters
-
int | a valid MDB2 timestamp |
- Returns
- array with the time split @access public
Definition at line 174 of file Date.php.
175 {
176 list($arr['year'], $arr['month'], $arr['day'], $arr['hour'], $arr['minute'], $arr['second']) =
177 sscanf($mdb_timestamp, "%04u-%02u-%02u %02u:%02u:%02u");
178 return $arr;
179 }
Referenced by mdbstamp2Unix().
◆ mdbstamp2Unix()
MDB2_Date::mdbstamp2Unix |
( |
|
$mdb_timestamp | ) |
|
convert a MDB2 timestamp into a unix timestamp
- Parameters
-
int | a valid MDB2 timestamp |
- Returns
- string unix timestamp with the time stored in the MDB2 format
@access public
Definition at line 155 of file Date.php.
156 {
158
159 return mktime($arr['hour'], $arr['minute'], $arr['second'], $arr['month'], $arr['day'], $arr['year'], -1);
160 }
mdbstamp2Date($mdb_timestamp)
convert a MDB2 timestamp into an array containing all values necessary to pass to php's date() functi...
References mdbstamp2Date().
◆ mdbTime()
return the current time
- Returns
- string current time in the MDB2 format @access public
Definition at line 101 of file Date.php.
102 {
103 return date(
'H:i:s');
104 }
References date.
◆ mdbToday()
return the current date
- Returns
- string current date in the MDB2 format @access public
Definition at line 87 of file Date.php.
References date.
◆ unix2Mdbstamp()
MDB2_Date::unix2Mdbstamp |
( |
|
$unix_timestamp | ) |
|
convert a unix timestamp into a MDB2 timestamp
- Parameters
-
int | a valid unix timestamp |
- Returns
- string a valid MDB2 timestamp @access public
Definition at line 139 of file Date.php.
140 {
141 return date(
'Y-m-d H:i:s', $unix_timestamp);
142 }
References date.
Referenced by date2Mdbstamp().
The documentation for this class was generated from the following file:
- Services/Database/lib/PEAR/MDB2/Date.php