MCPcopy
hub / github.com/avinassh/rockstar / dates

Method dates

rockstar/RockStar.py:76–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74
75 def _get_dates_list(self):
76 def dates():
77 today = date.today()
78 for day_delta in range(self.days):
79 day = today - timedelta(days=day_delta)
80 if day.strftime('%A') in self.days_off:
81 continue
82 if randint(1, 100) < self.off_fraction * 100:
83 continue
84 for i in range(randint(1, 10)):
85 yield day
86 return [datetime.combine(d, self._get_random_time())
87 for d in dates()]
88

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected