Use ceil() to obtain the number of days left.

When it's 0.5 days till the next day, treat it as 1 day left.
Treat creation date as fourth factor for determining the sort order.