"Dates" aren't sorted by frequency [bug?]
BeanBagKing opened this issue · comments
I'm not sure if this was intentional, a bug, or just an artifact of the behavior of this checker. However, "date_checker.rb" does not sort the resulting lists by frequency like every other checker. It appears that everything else uses "list_checker.rb" which sorts the output, date_checker does not.
For example, vehicles are sorted in descending order:
Vehicle
car = 101125 (0.31%)
ford = 9976 (0.03%)
bmw = 4829 (0.01%)
audi = 4653 (0.01%)
Here's a sample from Dates/Months, where March should come first (but doesn't), followed by January and February.
Dates
Months
january = 3259 (0.01%)
february = 1273 (0.0%)
march = 8481 (0.03%)
I don't remember if it was intentional or not, but see if this works for you, it shows the months in both year order and frequency based. I can patch up the rest of the results in the same way if it looks good.
Did you get chance to test this?
Just getting around to this. Thanks for the poke. Yes, it seems to run fine, and the "Months (Frequency ordered)" appear to be correct.
Happened to see your forgotten reminder so hereby a 'bump' ;)
just realised why I left this open, I need to fix days and months abbreviated. Will do that now.
I've fixed the rest in https://github.com/digininja/pipal/tree/moredatefixes . Please check and comment.
This is fixed but it made me notice that the years were only being checked to 2020 so they now go up to 2030.