Fixed date sort

- Fixed sorting by dates
- Improved sorting speed by a couple nanoseconds