MCPcopy Index your code
hub / github.com/gelstudios/gitfiti / get_start_date

Function get_start_date

gitfiti.py:325–336  ·  view source on GitHub ↗

returns a datetime object for the first sunday after one year ago today at 12:00 noon

()

Source from the content-addressed store, hash-verified

323
324
325def get_start_date():
326 """returns a datetime object for the first sunday after one year ago today
327 at 12:00 noon"""
328 today = datetime.today()
329 date = datetime(today.year - 1, today.month, today.day, 12)
330 weekday = datetime.weekday(date)
331
332 while weekday < 6:
333 date = date + timedelta(1)
334 weekday = datetime.weekday(date)
335
336 return date
337
338
339def generate_next_dates(start_date, offset=0):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected