I am looking for solution in Swift 3 where my app will generate random number from current date in the range <0;1000>.
For example I would love to get something like this:
14/2/2017 -> 323
15/2/2017 -> 25
16/2/2017 -> 898
...
If I remember right in Java I was able to generate same number each time by using certain seed in my random number generator which allowed me to generate same number all the time. I was thinking about using value of year+month+day as the seed to generate same number for all the users that will use app at the same day.
Java:
seed = currentYear + currentMonth + currentDay
Random generator = new Random(seed);
double random = generator.nextDouble();
...
Please help me to solve that problem in Swift 3, I have tried to go through all arc4random and other random functions and I didn't found any solution.