Date formats

This change covers exporting and parsing JSON and XML date formats, I didn't know the rest of the file format "date format" options, but it's easy to add.

I hand-edited the changes into the minimized version...