Skip to content

Instantly share code, notes, and snippets.

@jorgebastida
Last active August 29, 2015 14:10
Show Gist options
  • Save jorgebastida/e5db1b7f6c8d1cab7b8e to your computer and use it in GitHub Desktop.
Save jorgebastida/e5db1b7f6c8d1cab7b8e to your computer and use it in GitHub Desktop.
import random
from datetime import datetime
def random_date(start, end):
return datetime.fromtimestamp(random.randint(*map(lambda x: int(x.strftime('%s')), (start, end))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment