Re: Just screwing around
Re: Just screwing around
- Subject: Re: Just screwing around
- From: Nigel Garvey <email@hidden>
- Date: Tue, 26 Nov 2002 00:16:37 +0000
Michelle Steiner wrote on Mon, 25 Nov 2002 15:31:07 -0700:
>
screw(the current date)
>
>
on screw(Input)
>
set the day of the Input to random number from 1 to 28
>
set the year of the Input to random number from 1700 to 2400
>
set the month of the Input to some item of {January, February, March,
>
April, May, June, July, August, September, October, November, December}
>
return the Input
>
end screw
Another way to get a random date in this range - if you didn't want to
exclude the possible days 29 to 31 and also wanted to randomise the time
- would be:
screw()
on screw()
date "Thursday, 31 December 1699 23:59:59"
return result + (random number from 1 to ((date "Sunday, 31 December
2400 23:59:59") - result))
end screw
Is this more, or less random than Michelle's script?
NG
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.