puppetlabs/puppetdb — pull request #363 by cprice-puppet (2012-11-29 15:58:55+00:00)
Title: Add `com.puppetlabs.time` namespace, time utility functions

This commit adds a new namespace containing some time-related utility
functions.

In particular, it adds a function `parse-period` which,
given a (semi-) human-readable string representation of a duration
of time, will parse the string and return an instance of joda time's
`Period` class. (so, e.g., `(parse-period "2d")` returns a joda time
`Period` representing 2 days).

It also adds some helper functions that will convert `Period`
instances to other units of time.