Skip to content
Advertisement

Random time and date

I want to get a date that generates the time from now to 2685 days back and a random time. The format I accept must be “uuuu-MM-dd’T’HH: mm: ssZ”. Currently my program is generating a random date but I am not able to create a random time because Duration conflicts with Period

JavaScript

Advertisement

Answer

Something like this may be?

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement