change way days are stored so that they are sorted by time