modess / git-pretty-stats

Self hosted graphs for Git repositories in PHP
Other
142 stars 24 forks source link

Statistics for date range #6

Open ahilles107 opened 10 years ago

ahilles107 commented 10 years ago

Would be nice to have this feature. For now we can get this by modifying gitter.

--- /var/www/git-stats/vendor/klaussilveira/gitter/lib/Gitter/Repository.php
@@ -11,7 +11,10 @@
         foreach ($logs as $log) {
             $commit = new Commit;
             $commit->importData($log);
-            $commits[] = $commit;
+            $date = new \Gitter\Util\DateTime('2013-01-01 00:00:00');
+            if ($commit->getDate() > $date) {
+                $commits[] = $commit;
+            }
         }

         return $commits;
modess commented 10 years ago

This is definitely a feature that is going to be implemented somewhere in the near future.