diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-04-26 16:09:57 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-04-26 16:09:57 +0000 |
commit | f5d0e11f61c93d1ed4a6660408002b9ee1e8bd58 (patch) | |
tree | 2ea2ee832d85697a3feba8421e02df8a7bcaa3c6 /includes/common.inc | |
parent | 8a280389de5d6d54a1a40247eda7fea7af6b03d1 (diff) | |
download | brdo-f5d0e11f61c93d1ed4a6660408002b9ee1e8bd58.tar.gz brdo-f5d0e11f61c93d1ed4a6660408002b9ee1e8bd58.tar.bz2 |
- Patch #445414 by Damien Tournoud, tassoman: format_interval doesn't format monthly intervals.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc index 466d50a1c..64cccd921 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1472,7 +1472,15 @@ function format_size($size, $langcode = NULL) { * A translated string representation of the interval. */ function format_interval($timestamp, $granularity = 2, $langcode = NULL) { - $units = array('1 year|@count years' => 31536000, '1 week|@count weeks' => 604800, '1 day|@count days' => 86400, '1 hour|@count hours' => 3600, '1 min|@count min' => 60, '1 sec|@count sec' => 1); + $units = array( + '1 year|@count years' => 31536000, + '1 month|@count months' => 2592000, + '1 week|@count weeks' => 604800, + '1 day|@count days' => 86400, + '1 hour|@count hours' => 3600, + '1 min|@count min' => 60, + '1 sec|@count sec' => 1 + ); $output = ''; foreach ($units as $key => $value) { $key = explode('|', $key); |