Open pucicu opened 2 years ago
Thanks for the bug report @pucicu.
usort
instead of uasort
I switched to natural order and added tests, see last commit.
usort($entries, 'compare_bib_entry_by_year') // works as expected
Could you try with the last commit on master?
Thanks for considering this issue.
I have checked out the last version and tried. But it still does not work as I would expect.
Perhaps I should explain a bit more my needs:
I have a bibtex file using year and month fields. I need to sort the output list by years and within the years by months. As far as I understand the documentation, I can sort it by
uasort($entries, 'compare_bib_entry_by_year,compare_bib_entry_by_month');
but this does not give the expected result. The years are still unsorted. The alternativesuasort($entries, 'compare_bib_entry_by_month,compare_bib_entry_by_year');
oralso do not sort as expected, because the months are not in the correct order within the individual years.
How can I have a resulting list with correctly sorted time?
Thanks!