better calc of date sort value