Fix issue with rendering epoch date

This address the issue with formatting the epoch timestamp, `0`, and
also refactors the code so that it's more organized and DRY.
Merge pull request #21 from ericf/epoch

Fix issue with rendering epoch date