Fixed date sorting in YieldStatistics.cs to sort the dates as datetimes instead of as strings.
This commit is contained in:
parent
6c8788dae5
commit
7b1c044730
@ -1,4 +1,6 @@
|
||||
using ReportingServices.Shared.Models.ProductionReport;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace ReportingServices.Shared.ViewModels.ProductionReport;
|
||||
|
||||
@ -49,7 +51,7 @@ public class YieldStatistics
|
||||
}
|
||||
|
||||
dateTimes.Sort();
|
||||
dates.Sort();
|
||||
dates = dates.OrderBy(x => DateTime.Parse(x)).ToList();
|
||||
|
||||
DateTime currentDateTime = dateTimes.ElementAt(0);
|
||||
for (int i = 1; i < dateTimes.Count; i++)
|
||||
|
@ -1 +1 @@
|
||||
[{"Date":"2023-01-22T23:00:00-08:00","ASM":7,"HTR":16},{"Date":"2023-01-23T23:00:00-08:00","ASM":7,"HTR":15},{"Date":"2023-01-25T23:00:00-08:00","ASM":7,"HTR":14},{"Date":"2023-02-19T23:00:00-08:00","ASM":3,"HTR":8},{"Date":"2023-02-28T23:00:00-08:00","ASM":3,"HTR":8},{"Date":"2023-03-02T23:00:00-08:00","ASM":3,"HTR":8},{"Date":"2023-04-03T00:00:00-07:00","ASM":2,"HTR":6},{"Date":"2023-05-25T00:00:00-07:00","ASM":2,"HTR":8},{"Date":"2023-06-12T00:00:00-07:00","ASM":2,"HTR":7},{"Date":"2023-07-05T00:00:00-07:00","ASM":0,"HTR":8},{"Date":"2023-10-12T00:00:00-07:00","ASM":2,"HTR":7},{"Date":"2023-10-13T00:00:00-07:00","ASM":4,"HTR":8},{"Date":"2023-10-27T00:00:00-07:00","ASM":3,"HTR":7}]
|
||||
[{"Date":"2023-01-23T00:00:00-07:00","ASM":7,"HTR":16},{"Date":"2023-01-24T00:00:00-07:00","ASM":7,"HTR":15},{"Date":"2023-01-26T00:00:00-07:00","ASM":7,"HTR":14},{"Date":"2023-02-20T00:00:00-07:00","ASM":3,"HTR":8},{"Date":"2023-03-01T00:00:00-07:00","ASM":3,"HTR":8},{"Date":"2023-03-03T00:00:00-07:00","ASM":3,"HTR":8},{"Date":"2023-04-03T00:00:00-07:00","ASM":2,"HTR":6},{"Date":"2023-05-25T00:00:00-07:00","ASM":2,"HTR":8},{"Date":"2023-06-12T00:00:00-07:00","ASM":2,"HTR":7},{"Date":"2023-07-05T00:00:00-07:00","ASM":0,"HTR":8},{"Date":"2023-10-12T00:00:00-07:00","ASM":2,"HTR":7},{"Date":"2023-10-13T00:00:00-07:00","ASM":4,"HTR":8},{"Date":"2023-10-27T00:00:00-07:00","ASM":3,"HTR":7},{"Date":"2023-11-10T00:00:00-07:00","ASM":3,"HTR":8}]
|
Loading…
x
Reference in New Issue
Block a user