Fixed a bug in random date generation in range