MiscUtils.DateInterval | index /usr/local/share/webware/MiscUtils/DateInterval.py

`DateInterval.py
Convert interval strings (in the form of 1w2d, etc) to seconds, and back again.
Is not exactly about months or years (leap years in particular).
Accepts (y)ear, (b)month, (w)eek, (d)ay, (h)our, (m)inute, (s)econd.
Exports only timeEncode and timeDecode functions.`

Modules

``

re |  |  |

Functions

``

timeDecode(s)
  `Decode a number in the format 1h4d3m (1 hour, 3 days, 3 minutes).
  Decode the format into a number of seconds.`

timeEncode(seconds)
  `Encode a number of seconds (representing a time interval).
  Encode the number into a form like 2d1h3s.`

Data
`` |  | __all__ = ['timeEncode', 'timeDecode']