Allow custom serialization instead of localize

fixes #63 on github
attempts to address #49 on github

Adds support for formatting datetimes.