From 90eaf484fb405eaec348c2153674ae4a56511e28 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 12 Jan 2022 17:28:46 +0800 Subject: [PATCH] optimize: get start time of current week --- src/Views/Statistics.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/Statistics.xaml.cs b/src/Views/Statistics.xaml.cs index 46902e59..58734af0 100644 --- a/src/Views/Statistics.xaml.cs +++ b/src/Views/Statistics.xaml.cs @@ -41,7 +41,7 @@ namespace SourceGit.Views { var mapCommitterWeek = new Dictionary(); var mapCommitterMonth = new Dictionary(); - var weekStart = today.AddDays(-(int)today.DayOfWeek).AddSeconds(-today.Hour * 3600 - today.Minute * 60 - today.Second); + var weekStart = today.AddSeconds(-(int)today.DayOfWeek * 3600 * 24 - today.Hour * 3600 - today.Minute * 60 - today.Second); var weekEnd = weekStart.AddDays(7); var limits = $"--branches --remotes --since=\"{today.ToString("yyyy-MM-01 00:00:00")}\"";