Package Gnumed :: Package timelinelib :: Package calendar :: Package gregorian :: Module timetype :: Class DurationFormatter |
[frames] | no frames]

# Class DurationFormatter

source code

    object --+
             |
            DurationFormatter

Instance Methods
__init__(self, duration) Duration is a list containing days and seconds. | source code
format(self, duration_parts) Return a string describing a time duration. | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, duration) (Constructor) | source code
Duration is a list containing days and seconds. Overrides: object.__init__

### format(self, duration_parts) | source code
Return a string describing a time duration. Such a string can look like:
       2 years 1 month 3 weeks
The argument duration_parts is a tuple where each element describes a duration type like YEARS, WEEKS etc.