I'm trying to parse a list of dates so say I have the following data:
2012-02-19 10:06:29.287
2012-02-19 10:06:29.900
2014-01-21 15:21:11.114
2015-04-22 01:11:50.233
2015-04-22 01:11:55.921
2015-04-22 01:12:12.144
2017-12-18 12:01:01.762
I want to then be left with the following list:
2012-02-19 10:06:29.900
2014-01-21 15:21:11.114
2015-04-22 01:12:12.144
2017-12-18 12:01:01.762
Where any dates that are within 1 minute of each other, all are removed except the most recent date. With fluent syntax LINQ if possible.
So in the above example we have 2 dates that fit that criteria:
2012-02-19 10:06:29.287
2012-02-19 10:06:29.900
Are within 1 minute of each other, so the first entry is removed so only the most recent is left.
2015-04-22 01:11:50.233
2015-04-22 01:11:55.921
2015-04-22 01:12:12.144
Has 3 within a minute of each other, so the first two should be removed and left with only the last.