devtools/fill.py
branchstable
changeset 4651 f9cd35dece09
parent 4513 8abf464d2ffe
child 5421 8167de96c523
--- a/devtools/fill.py	Mon Feb 22 18:22:54 2010 +0100
+++ b/devtools/fill.py	Mon Feb 22 19:25:04 2010 +0100
@@ -142,7 +142,7 @@
 
     def generate_date(self, entity, attrname, index):
         """generates a random date (format is 'yyyy-mm-dd')"""
-        base = date(randint(2000, 2004), randint(1, 12), randint(1, 28))
+        base = date(randint(2000, 2010), 1, 1) + timedelta(randint(1, 365))
         return self._constrained_generate(entity, attrname, base, timedelta(days=1), index)
 
     def generate_time(self, entity, attrname, index):