WLJS LogoWLJS Notebook

RandomTime

RandomTime[] gives a pseudorandom time of day.

  • RandomTime[{timemin, timemax}] gives a pseudorandom time between the times timemin and timemax.
  • RandomTime[time] gives a pseudorandom time between the start and end of the time period time.
  • RandomTime[quantity] gives a pseudorandom time between now and the time quantity duration from now.
  • RandomTime[range, n] gives a list of n pseudorandom times.

Examples

RandomTime[]
RandomTime[{TimeObject[{9, 0}], TimeObject[{17, 0}]}, 5]

Please visit the official Wolfram Language Reference for more details.

On this page