SecUSo / privacy-friendly-sudoku

Privacy Friendly App to play Sudoku on Android.
https://secuso.org/pfa-sudoku
GNU General Public License v3.0
139 stars 54 forks source link

Sodoku of the Day: wrong sort order #73

Closed holgis closed 3 years ago

holgis commented 3 years ago

In Sodoku of the Day section results of finished games is stored. The results seem to be ordered by date, but instead of sorting by day, month and year it seem to be ordering by year, month and day. So my list looks like this: 29.11.2020 28.12.2020 28.11.2020 27.11.2020 26.12.2020 25.11.2020 24.12.2020 24.11.2020

I would expect it to be ordered like this: 28.12.2020 26.12.2020 24.12.2020 29.11.2020 28.11.2020 27.11.2020 25.11.2020 24.11.2020

sagehane commented 3 years ago

I would also like to add that it doesn't seem to be ordering by year? My list looks like this: Dec 30, 2020 Dec 29, 2020 Dec 28, 2020 Dec 27, 2020 Dec 26, 2020 Jan 7, 2021 Jan 6, 2021 Jan 5, 2021 Jan 4, 2021 Jan 3, 2021 Jan 2, 2021 Jan 1, 2021

I would expect the year 2021 to come before 2020, as it's the more recent year, right? (It's showing as January 2021 because of the issue described on #72)

holgis commented 3 years ago

So it looks like, depending on the local date format, it's been ordered by first, second and third element instead of day, month and year. Maybe solution is to use internal for sorting purpose the ISO format: yyyy-mm-dd and then display the local date.