Ordering by day and period