starting plan view tests
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user