a guest Oct 21st, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- # Ruby Cheat Sheet
- ## How to generate a random date and time between two dates?
- Time.at((date2.to_f - date1.to_f)*rand + date1.to_f)
RAW Paste Data