Output date as a string for java.

Fixes #10.
Add examples of all output types.