我有一个总共 14 天的 DateTime 列表。每天有2次。
此列表按日期时间排序。
DateTime DayofWeek
16-03-2021 08:00 Tuesday
16-03-2021 20:00 Tuesday
17-03-2021 08:00 Wednesday
17-03-2021 20:00 Wednesday
18-03-2021 08:00 Thursday
18-03-2021 20:00 Thursday
19-03-2021 08:00 Friday
19-03-2021 20:00 Friday
20-03-2021 08:00 Saturday
20-03-2021 20:00 Saturday
21-03-2021 08:00 Sunday
21-03-2021 20:00 Sunday
22-03-2021 08:00 Monday
22-03-2021 20:00 Monday
23-03-2021 08:00 Tuesday
23-03-2021 20:00 Tuesday
24-03-2021 08:00 Wednesday
24-03-2021 20:00 Wednesday
25-03-2021 08:00 Thursday
25-03-2021 20:00 Thursday
26-03-2021 08:00 Friday
26-03-2021 20:00 Friday
27-03-2021 08:00 Saturday
27-03-2021 20:00 Saturday
28-03-2021 08:00 Sunday
28-03-2021 20:00 Sunday
29-03-2021 08:00 Monday
29-03-2021 20:00 Monday
但是,我想每隔 7 天按星期几对它进行排序。(总是星期一优先)
预期结果 :
DateTime DayofWeek
22-03-2021 08:00 Monday
22-03-2021 20:00 Monday
16-03-2021 08:00 Tuesday
16-03-2021 20:00 Tuesday
17-03-2021 08:00 Wednesday
17-03-2021 20:00 Wednesday
18-03-2021 08:00 Thursday
18-03-2021 20:00 Thursday
19-03-2021 08:00 Friday
19-03-2021 20:00 Friday
20-03-2021 08:00 Saturday
20-03-2021 20:00 Saturday
21-03-2021 08:00 Sunday
21-03-2021 20:00 Sunday
29-03-2021 08:00 Monday
29-03-2021 20:00 Monday
23-03-2021 08:00 Tuesday
23-03-2021 20:00 Tuesday
24-03-2021 08:00 Wednesday
24-03-2021 20:00 Wednesday
25-03-2021 08:00 Thursday
25-03-2021 20:00 Thursday
26-03-2021 08:00 Friday
26-03-2021 20:00 Friday
27-03-2021 08:00 Saturday
27-03-2021 20:00 Saturday
28-03-2021 08:00 Sunday
28-03-2021 20:00 Sunday
最好的排序方法是什么?
提前致谢。