Roundup Tracker - Issues


Author antmail
Recipients antmail
Date 2015-06-18.11:31:28
Message-id <>
Outputing period (duration) from a template seems to be rather complex.
Also, 'pretty' format with words 'ago', 'in' may be a problem for
outputing duration only .

I create some functions for simplifying this task:
def periodof(self, pretty=1, othdate='.'):
    """ Render the duration between this date and other date (default is
now). If the "pretty" flag is true, then make the display human readable."""

def period()
# return interval in human readable format such as "1 month", "2 week" etc.

Use it in templates as:
issue.closedate.periodof(othdate = issue.creation)
Date User Action Args
2015-06-18 11:31:28antmailsetrecipients: + antmail
2015-06-18 11:31:28antmailsetmessageid: <>
2015-06-18 11:31:28antmaillinkissue2550889 messages
2015-06-18 11:31:28antmailcreate