Compare commits

...

2 Commits

2 changed files with 4 additions and 3 deletions

View File

@ -102,7 +102,7 @@ public class Entry {
this.datetime = json.GetValue("timestamp")?.ToString(); this.datetime = json.GetValue("timestamp")?.ToString();
if (!string.IsNullOrEmpty(this.datetime)) { if (!string.IsNullOrEmpty(this.datetime)) {
this.timestamp = DateTime.Parse(this.datetime); this.timestamp = DateTime.Parse(this.datetime, null, System.Globalization.DateTimeStyles.RoundtripKind);
} }
} }

View File

@ -68,11 +68,12 @@ public partial class MainWindow : Window {
TransactionParser parser = new TransactionParser(); TransactionParser parser = new TransactionParser();
List<Transaction> transactions = parser.Parse(entries); List<Transaction> transactions = parser.Parse(entries);
List<IncompleteTransaction> incompletes = transactions.OfType<IncompleteTransaction>().ToList();
// Log incomplete and remove them from the results. // Log incomplete and remove them from the results.
foreach (var incomplete in transactions.OfType<IncompleteTransaction>()) { foreach (var incomplete in incompletes) {
Log(incomplete.Reason); Log(incomplete.Reason);
transactions.Remove(incomplete);
} }
transactions.RemoveAll(x => incompletes.Contains(x));
report = new Report(transactions); report = new Report(transactions);
this.entries.ItemsSource = report.Objectives; this.entries.ItemsSource = report.Objectives;