Works correctly when 2 lines have the same date