SHARE
TWEET

Untitled

a guest Oct 21st, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Ruby Cheat Sheet
  2.  
  3. ## How to generate a random date and time between two dates?
  4. ```ruby
  5. Time.at((date2.to_f - date1.to_f)*rand + date1.to_f)
  6. ```
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top