How do I find a number between two given numbers (let's call them min and max), which has the greatest product of digits than any other number in that range? (If there are several such numbers, that's fine.)

For example:
+ min = 390, max = 430 => answer is 399
+ min = 400, max = 430 => answer is 429
+ min = 1378, max = 1594 => answer is 1589 (this one is not as obvious as previous, because 1499 is not...