We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 434777d commit 740c8b9Copy full SHA for 740c8b9
src/Models/Statistics.cs
@@ -1,6 +1,6 @@
1
using System;
2
using System.Collections.Generic;
3
-
+using System.Globalization;
4
using LiveChartsCore;
5
using LiveChartsCore.Defaults;
6
using LiveChartsCore.SkiaSharpView;
@@ -138,7 +138,7 @@ public class Statistics
138
public Statistics()
139
{
140
_today = DateTime.Now.ToLocalTime().Date;
141
- _thisWeekStart = _today.AddSeconds(-(int)_today.DayOfWeek * 3600 * 24);
+ _thisWeekStart = _today.AddDays(-7 + (int)_today.DayOfWeek + (int)CultureInfo.CurrentCulture.DateTimeFormat.FirstDayOfWeek);
142
_thisMonthStart = _today.AddDays(1 - _today.Day);
143
144
All = new StatisticsReport(StaticsticsMode.All, DateTime.MinValue);
0 commit comments