From d5c7de54b16fa8d55fc42f34920cbee001a092a0 Mon Sep 17 00:00:00 2001 From: Dvorinka Date: Fri, 20 Jun 2025 09:42:46 +0200 Subject: [PATCH] r --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 50a3c52..ba92cf2 100644 --- a/main.go +++ b/main.go @@ -230,7 +230,7 @@ func trackVisit(w http.ResponseWriter, r *http.Request) { } // Reset weekly visits on Monday - if stats.LastUpdated.Weekday() != time.Now().Weekday() { + if time.Now().Weekday() == time.Monday && stats.LastUpdated.Weekday() != time.Monday { stats.WeeklyVisits = 1 } @@ -248,7 +248,7 @@ func trackVisit(w http.ResponseWriter, r *http.Request) { } w.WriteHeader(http.StatusOK) -} + // Helper function to extract OS from User-Agent func getOSFromUserAgent(userAgent string) string {