function _optimizedb_date in OptimizeDB 6
Same name and namespace in other branches
- 8 optimizedb.module \_optimizedb_date()
- 7 optimizedb.module \_optimizedb_date()
Output how much time passed from the specified date.
Parameters
int $timestamp: The date in Unix format.
Return value
string The formatted date.
2 calls to _optimizedb_date()
- optimizedb_admin in ./
optimizedb.module - Configuring the module.
- optimizedb_requirements in ./
optimizedb.install - Implements hook_requirements().
File
- ./
optimizedb.module, line 490 - Database Optimization.
Code
function _optimizedb_date($timestamp) {
$timestamp = (int) $timestamp;
if ($timestamp == 0) {
return t('None');
}
$difference = OPTIMIZEDB_REQUEST_TIME - $timestamp;
$text = format_interval($difference, 1);
return $text;
}