improved date handling - already in production