sort array list of special strings, by date

前端 未结 6 598
有刺的猬
有刺的猬 2021-01-25 10:33

I have an arrayList.

This is an arrayList of strings. The string contains a \"Date.toString\" in format of \"January 1, 1970, 00:00:00 GMT\" +

6条回答
  •  野的像风
    2021-01-25 10:52

    Write a comparator in which, convert the strings to dates for comparison. Collections.sort(List, Comparator); does the job after that.

提交回复
热议问题