Add option to allow specifying the date format

Fixes #43