Guest User

Untitled

a guest
Oct 21st, 2019
69
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