How do I format timedelta greater than 24 hours for display only containing hours in Python?
>>> import datetime
>>> td = datetime.timedelt
from datetime import timedelta
from babel.dates import format_timedelta
delta = timedelta(days=6)
format_timedelta(delta, locale='en_US')
u'1 week'
More info: http://babel.pocoo.org/docs/dates/
This will format your interval according to a given locale. I guess it is better, because it will always use the official format for your locale.
Oh, and it has a granularity parameter. (I hope I could understand your question...)