aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2011-06-21 12:24:45 +0000
committerRomain d'Alverny <rda@mageia.org>2011-06-21 12:24:45 +0000
commit8ef496b1828070518744ff61a310aa63a7154d94 (patch)
tree01b557e84922d6fca15ebe69c24e7e26f4d69332
parent5a5fcfea09eb77f5ce75116a67dd2e979970f48c (diff)
downloaddashboard-8ef496b1828070518744ff61a310aa63a7154d94.tar
dashboard-8ef496b1828070518744ff61a310aa63a7154d94.tar.gz
dashboard-8ef496b1828070518744ff61a310aa63a7154d94.tar.bz2
dashboard-8ef496b1828070518744ff61a310aa63a7154d94.tar.xz
dashboard-8ef496b1828070518744ff61a310aa63a7154d94.zip
better datesHEADmaster
-rw-r--r--Report/Box/00_Project.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/Report/Box/00_Project.php b/Report/Box/00_Project.php
index 78d3cd6..ddf82ff 100644
--- a/Report/Box/00_Project.php
+++ b/Report/Box/00_Project.php
@@ -24,7 +24,8 @@ class Report_Box_Project extends Report_Box
function _get_var_definitions() {
return array(
'age' => ':render',
- 'next' => ':render',
+ 'age_mageia_1' => ':render',
+// 'next' => ':render',
'contribs' => '%d registered contributors',
// 'packagers' => '%d packagers',
);
@@ -41,6 +42,17 @@ class Report_Box_Project extends Report_Box
);
}
+ function _render_value_age_mageia_1()
+ {
+ $today = time();
+ $myBirthDate = strtotime("2011-06-01 00:00:00");
+ return array(
+ 't' => sprintf("Mageia 1 is %d days old.", round(abs($today-$myBirthDate)/60/60/24)),
+ 'c' => 'ok',
+ 's' => 0
+ );
+ }
+
function _render_value_next()
{
$today = time();