summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-08-29 18:55:47 +0200
committerAki <please@ignore.pl>2024-08-29 18:55:47 +0200
commit5639c172509cbdc9a55db6fbdad952ac1b880f70 (patch)
treeffdc124a35303869a345ecdd2e073b6d027b701e
parent68a43471f81877bbeb9a152dc350a3dd170193bc (diff)
downloadrudone-5639c172509cbdc9a55db6fbdad952ac1b880f70.zip
rudone-5639c172509cbdc9a55db6fbdad952ac1b880f70.tar.gz
rudone-5639c172509cbdc9a55db6fbdad952ac1b880f70.tar.bz2
Added last 365 stat summaryHEADmaster
-rw-r--r--main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.go b/main.go
index e139fe3..53fc5c1 100644
--- a/main.go
+++ b/main.go
@@ -101,6 +101,10 @@ func handleHome(pathname string) func(http.ResponseWriter, *http.Request) {
if err == nil {
home.Stats = append(home.Stats, count("Last 30 days", len(last_month)))
}
+ last_year, err := EntriesSince(now.AddDate(0, 0, -365))
+ if err == nil {
+ home.Stats = append(home.Stats, count("Last 365 days", len(last_year)))
+ }
total, err := CountEntries()
if err == nil {
home.Stats = append(home.Stats, count("All time", int(total)))