Skip to content

Commit fde96af

Browse files
committed
fixed datetime
1 parent df5444d commit fde96af

File tree

1 file changed

+25
-16
lines changed

1 file changed

+25
-16
lines changed

paia.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -339,18 +339,22 @@ boolean
339339
: Either true or false. Note that omitted boolean values are *not* false by
340340
default but unknown!
341341
date
342-
: A date value in `YYYY-MM-DD` format.
342+
: A date value in `YYYY-MM-DD` format. A datetime value with time and timezone
343+
SHOULD be used instead, if possible.
343344
datetime
344-
: A date value with mandatory timezone and optional time. The format is
345-
`YYYY-MM-DD`, optionally followed by `hh:mm:ss`, mandatorily followed by
346-
either `Z` for UTC or `+hh:mm` or `-hh:mm` for another timezone, where:
345+
: A date value in `YYY-MM-DD` format, optionally followed by a time value. A
346+
time value consists of the letter `T` followed by `hh:mm:ss` format, and a
347+
timezone indicator (`Z` for UTC or `+hh:ss` or `-hh:ss`) where:
347348

348-
* YYYY indicates a year
349-
* MM indicates a month
350-
* DD indicates a day
351-
* hh indicates an hour
352-
* mm indicates a minute
353-
* ss indicates a second
349+
* `YYYY` indicates a year (`0001` through `9999`)
350+
* `MM` indicates a month (`01` through `12`)
351+
* `DD` indicates a day (`01` through `31`)
352+
* `hh` indicates an hour (`00`and `23`)
353+
* `mm` indicates a minute (`00` through `59`)
354+
* `ss` indicates a second (`00` through `59`)
355+
356+
Examples of valid datetime values include `2015-03-20` (a date),
357+
`2016-03-09T11:58:19+10:00`, and `2017-08-21T12:24:28-06:00`.
354358

355359
money
356360
: A monetary value with currency (format `[0-9]+\.[0-9][0-9] [A-Z][A-Z][A-Z]`),
@@ -438,16 +442,21 @@ Note that timezone information is mandatory in these fields. The field
438442
The response fields `label`, `storage`, `storageid`, and `queue`
439443
correspond to properties in DAIA.
440444

441-
An example of a document (with status 5=rejected) serialized in JSON is
442-
given below. In this case an arbitrary copy of a selected document was
443-
requested and mapped to a particular copy that turned out to be not accessible:
445+
**Examples**
446+
447+
An example of a documentserialized in JSON is given below. In this case a
448+
general document (`http://example.org/documents/9876543`) was requested an
449+
mapped to a particular copy (`http://example.org/items/barcode1234567`) by the
450+
PAIA server. The copy turned out to be lost, so the request was rejected
451+
(status 5) at 2014-07-12, 14:07 UTC.
444452

445453
~~~~ {.json}
446454
{
447455
"status": 5,
448456
"item": "http://example.org/items/barcode1234567",
449457
"edition": "http://example.org/documents/9876543",
450458
"requested": "http://example.org/documents/9876543",
459+
"starttime": "2014-07-12T14:07Z",
451460
"error": "sorry, we found out that our copy is lost!"
452461
}
453462
~~~~
@@ -472,7 +481,7 @@ response fields
472481
--------- ------ --------------- ------------------------------
473482
name 1..1 string full name of the patron
474483
email 0..1 email email address of the patron
475-
expires 0..1 date date of patron account expiry
484+
expires 0..1 datetime patron account expiry
476485
status 0..1 account state current state (0, 1, 2, or 3)
477486
--------- ------ --------------- -------------------------------
478487
mapping to RDF
@@ -554,7 +563,7 @@ X-OAuth-Scopes: read_items read_patron
554563
"renewals": 0,
555564
"reminder": 0,
556565
"starttime": "2014-05-08T12:37Z",
557-
"endtime": "2014-06-09+00:00",
566+
"endtime": "2014-06-09",
558567
"duedate": "2014-06-09"
559568
"cancancel": false,
560569
},{
@@ -564,7 +573,7 @@ X-OAuth-Scopes: read_items read_patron
564573
"label": "BIO SED 03",
565574
"queue": 1,
566575
"starttime": "2014-05-12T18:07Z",
567-
"endtime": "2014-05-24Z",
576+
"endtime": "2014-05-24",
568577
"cancancel": true,
569578
"storage": "pickup service desk",
570579
"storageid": "http://bib.example.org/library/desk/7",

0 commit comments

Comments
 (0)