adding past 12 months
This commit is contained in:
@@ -37,6 +37,8 @@
|
|||||||
<a href="/rowers/history/?enddate={{ today|date:"Y-m-d" }}&startdate={{ last28|date:"Y-m-d" }}&workouttype={{ workouttype }}">Past 28 days</a>
|
<a href="/rowers/history/?enddate={{ today|date:"Y-m-d" }}&startdate={{ last28|date:"Y-m-d" }}&workouttype={{ workouttype }}">Past 28 days</a>
|
||||||
|
|
||||||
<a href="/rowers/history/?enddate={{ today|date:"Y-m-d" }}&startdate={{ firstmay|date:"Y-m-d" }}&workouttype={{ workouttype }}">Current Concept2 Season</a>
|
<a href="/rowers/history/?enddate={{ today|date:"Y-m-d" }}&startdate={{ firstmay|date:"Y-m-d" }}&workouttype={{ workouttype }}">Current Concept2 Season</a>
|
||||||
|
|
||||||
|
<a href="/rowers/history/?enddate={{ today|date:"Y-m-d" }}&startdate={{ lastyear|date:"Y-m-d" }}&workouttype={{ workouttype }}">Past 12 months</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="grid_2">
|
<li class="grid_2">
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -4763,8 +4763,11 @@ def history_view(request,userid=0):
|
|||||||
lastseven = timezone.now()-datetime.timedelta(days=7)
|
lastseven = timezone.now()-datetime.timedelta(days=7)
|
||||||
lastfourteen = timezone.now()-datetime.timedelta(days=14)
|
lastfourteen = timezone.now()-datetime.timedelta(days=14)
|
||||||
last28 = timezone.now()-datetime.timedelta(days=28)
|
last28 = timezone.now()-datetime.timedelta(days=28)
|
||||||
|
|
||||||
today = timezone.now()
|
today = timezone.now()
|
||||||
|
|
||||||
|
lastyear = datetime.datetime(year=today.year-1,month=today.month,day=today.day)
|
||||||
|
|
||||||
firstmay = datetime.datetime(year=today.year,month=5,day=1).astimezone(usertimezone)
|
firstmay = datetime.datetime(year=today.year,month=5,day=1).astimezone(usertimezone)
|
||||||
if firstmay>today:
|
if firstmay>today:
|
||||||
firstmay = datetime.datetime(year=today.year-1,month=5,day=1)
|
firstmay = datetime.datetime(year=today.year-1,month=5,day=1)
|
||||||
@@ -4786,6 +4789,7 @@ def history_view(request,userid=0):
|
|||||||
'lastseven':lastseven,
|
'lastseven':lastseven,
|
||||||
'lastfourteen':lastfourteen,
|
'lastfourteen':lastfourteen,
|
||||||
'last28':last28,
|
'last28':last28,
|
||||||
|
'lastyear':lastyear,
|
||||||
'today':today,
|
'today':today,
|
||||||
'workouttype':typeselect,
|
'workouttype':typeselect,
|
||||||
'firstmay':firstmay,
|
'firstmay':firstmay,
|
||||||
|
|||||||
Reference in New Issue
Block a user