Commit 87726cc0 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Remove obsolete function repr_duration in reporting_toos.

parent 963cc543
......@@ -13,7 +13,7 @@ from datetime import date, timedelta
from gluon.dal import smart_query
from gluon.storage import Storage
from plugin_dbui import Store
from reporting_tools import Report, repr_duration, StoreForListView
from reporting_tools import Report, StoreForListView
def list():
......
......@@ -12,30 +12,6 @@ from gluon.storage import Storage
from plugin_dbui import Selector, Store
def repr_duration(value):
"""Represent a duration as a string year + month
@type value: datetime.tiemdelta
@param value:
@rtype: str
"""
ny = value.days / 365
nm = int((value.days - ny*365) / (365./12.))
if ny:
return '%02i y + %02i m' % (ny, nm)
elif nm:
return '%02i m' % nm
elif value.days:
return '%02i d' % value.days
return ''
class SelectorActiveItems(Selector):
"""Selector to get records active during a given period of time.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment