# spacepy.time.randomDate

spacepy.time.randomDate(dt1, dt2, N=1, tzinfo=False, sorted=False)

  Return a (or many) random datetimes between two given dates

  Convention used is dt1 <= rand < dt2. Leap second times will not be returned.

  Parameters
    dt1 datetime.datetime

      start date for the the random date

    dt2 datetime.datetime

      stop date for the the random date

  Returns
    out datetime.datetime or numpy.ndarray of datetime.datetime

      the new time for the next call to EventTimer

  Other Parameters
    N int (optional)

      the number of random dates to generate (defualt=1)

    tzinfo bool (optional)

      maintain the tzinfo of the input datetimes (default=False)

    sorted bool (optional)

      return the times sorted (default=False)