period_to_seconds function

Contrive a period to/from a given number of seconds