code: def strduration_long (duration, do_translate=True):
      
      if do_translate:
          # use global translator functions
          global _, _n
      else:
          # do not translate
          _ = lambda x: x
          _n = lambda a, b, n: a if n==1 else b
      if duration < 0:
          duration = abs(duration)
          prefix = "-"
      else:
          prefix = ""
      if duration < 1:
          return _("%(prefix)s%(duration).02f seconds") % \
                 {"prefix": prefix, "duration": duration}
      # translation dummies
      _n("%d second", "%d seconds", 1)
      _n("%d minute", "%d minutes", 1)
      _n("%d hour", "%d hours", 1)
      _n("%d day", "%d days", 1)
      _n("%d year", "%d years", 1)
      cutoffs = [
          (60, "%d second", "%d seconds"),
          (60, "%d minute", "%d minutes"),
          (24, "%d hour", "%d hours"),
          (365, "%d day", "%d days"),
          (None, "%d year", "%d years"),
      ]
      time_str = []
      for divisor, single, plural in cutoffs:
          if duration < 1:
              break
          if divisor is None:
              duration, unit = 0, duration
          else:
              duration, unit = divmod(duration, divisor)
          if unit:
              time_str.append(_n(single, plural, unit) % unit)
      time_str.reverse()
      if len(time_str) > 2:
          time_str.pop()
      return "%s%s" % (prefix, ", ".join(time_str))
docs: Turn a time value in seconds into x hours, x minutes, etc.