Private
Public Access
1
0

cosmetic changes in training plan presentation

This commit is contained in:
Sander Roosendaal
2021-03-23 10:20:26 +01:00
parent 2abc533ada
commit da5611005a
3 changed files with 17 additions and 7 deletions

View File

@@ -25,6 +25,7 @@ import requests
from django.http import HttpResponse
import humanize
lbstoN = 4.44822
@@ -793,8 +794,9 @@ def step_to_string(step,short=False):
unit = 'min'
value = step['durationValue']
if value/1000. >= 3600:
unit = 'hour'
unit = 'h'
dd = timedelta(seconds=value/1000.)
#duration = humanize.naturaldelta(dd, minimum_unit="seconds")
duration = '{v}'.format(v=str(dd))
elif durationtype == 'Distance':
unit = 'm'