File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using SourceGit . ViewModels ;
2
3
3
4
namespace SourceGit . Commands
4
5
{
@@ -8,7 +9,7 @@ public Statistics(string repo)
8
9
{
9
10
WorkingDirectory = repo ;
10
11
Context = repo ;
11
- Args = $ "log --date-order --branches --remotes -40000 --pretty=format:\" %ct$%aN\" ";
12
+ Args = $ "log --date-order --branches --remotes -{ Preference . Instance . MaxHistoryCommits } --pretty=format:\" %ct$%aN\" ";
12
13
}
13
14
14
15
public Models . Statistics Result ( )
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
-
3
+ using System . Globalization ;
4
4
using LiveChartsCore ;
5
5
using LiveChartsCore . Defaults ;
6
6
using LiveChartsCore . SkiaSharpView ;
@@ -138,7 +138,7 @@ public class Statistics
138
138
public Statistics ( )
139
139
{
140
140
_today = DateTime . Now . ToLocalTime ( ) . Date ;
141
- _thisWeekStart = _today . AddSeconds ( - ( int ) _today . DayOfWeek * 3600 * 24 ) ;
141
+ _thisWeekStart = _today . AddDays ( ( ( int ) _today . DayOfWeek + ( int ) CultureInfo . CurrentCulture . DateTimeFormat . FirstDayOfWeek ) % 7 - 7 ) ;
142
142
_thisMonthStart = _today . AddDays ( 1 - _today . Day ) ;
143
143
144
144
All = new StatisticsReport ( StaticsticsMode . All , DateTime . MinValue ) ;
You can’t perform that action at this time.
0 commit comments