better date handling for random integers