Private
Public Access
1
0

starting plan view tests

This commit is contained in:
Sander Roosendaal
2019-02-04 17:06:51 +01:00
parent 8e847c9e5d
commit 72e1083a2d
5 changed files with 242 additions and 41 deletions

View File

@@ -468,3 +468,17 @@ def get_strava_stream(r,metric,stravaid,series_type='time',fetchresolution='high
s = requests.get(url,headers=headers)
return s
def allmonths(startdate,enddate):
d = startdate
while d<enddate:
yield d
d = datetime.date(d.year+(d.month / 12),((d.month % 12) + 1),1)
def allsundays(startdate,enddate):
d = startdate
d += datetime.timedelta(days = 6 - d.weekday()) # first Sunday
while d<=enddate:
yield d
d += datetime.timedelta(days=7)