Not sure if this could be more generalized and live in the sort.jl file or if it's special-cased enough to just stay here. It's not really Datetime specific. It could probably also use a better name.