slamdata/slamengine — pull request #444 by mossprescott (2014-11-18 07:13:45+00:00)
Title: implement timestamp and interval syntax (Fixes #442)

`timestamp` accepts an ISO 8601 date-time string, e.g. `2014-11-17T12:00:00.000Z`, with some amount of flexibility (seconds and fractional seconds are optional). To be precise, it accepts the syntax that is accepted by threeten's `Instant.parse()`.

`interval` accepts the less recognizable and somewhat bizarre ISO 8601 duration syntax, e.g. `P1DT6H30M`. Again, it's just being run through threeten's `Duration.parse()`.

Intervals become simple millisecond values at the mongodb level, for consistency with the way date values are handled.

`date` and `time` are implemented in the parser and the standard library, but there seems to be no simple way to implement them in MongoDB, so for now a planner error results if you try use them.

See:
- [`Instant.parse()`](http://www.threeten.org/threetenbp/apidocs/org/threeten/bp/Instant.html#parse-java.lang.CharSequence-)
- [`Duration.parse()`](http://www.threeten.org/threetenbp/apidocs/org/threeten/bp/Duration.html#parse-java.lang.CharSequence-)
- Wikipedia on ISO 8601: [Date-times](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) and [Durations](https://en.wikipedia.org/wiki/ISO_8601#Durations)