July 2017
Beginner to intermediate
358 pages
10h 54m
English
When returning a date, you should always use the DateLiteral format and preferably the Iso8601Literal. If you do need to send back a date in a format other than Iso8601Literal, then you can use a StructuredDateLiteral format, which allows you to specify the kind as part of the returned entity.
The informal Iso8601Literal format is the simplest method to use and should be understandable by almost any client consuming your API:
{"date": "2016-07-14T16:00Z"}
The more formal StucturedDateLiteral does not return a string, but an entity that contains two properties, kind and value:
{"date": {"kind": "U", "value": 1471186826}}
The permissible kinds are:
Read now
Unlock full access