Date based random function
Fixes #358