Skip to content

Commit

Permalink
feat(CreativeWork): Add dateReceived and dateAccepted properties
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Jan 30, 2020
1 parent e426380 commit 788f0bf
Showing 1 changed file with 31 additions and 21 deletions.
52 changes: 31 additions & 21 deletions schema/CreativeWork.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,35 @@ properties:
dateCreated:
'@id': schema:dateCreated
description: Date/time of creation.
anyOf:
- $ref: Date
- type: string
format: date
- type: string
format: date-time
allOf:
- $ref: '#/definitions/dateProperty'
dateReceived:
'@id': schema:dateReceived
description: Date/time that work was received.
allOf:
- $ref: '#/definitions/dateProperty'
dateAccepted:
'@id': stencila:dateAccepted
description: Date/time of acceptance.
$comment: |
This is not yet a schema.org property but the term is used
[in Dublin Core](http://purl.org/dc/terms/dateAccepted).
allOf:
- $ref: '#/definitions/dateProperty'
dateModified:
'@id': schema:dateModified
description: Date/time of most recent modification.
anyOf:
- $ref: Date
- type: string
format: date
- type: string
format: date-time
allOf:
- $ref: '#/definitions/dateProperty'
datePublished:
'@id': schema:datePublished
aliases:
# This assumes that a user specifying `date` means the date published
# and not the date modified or created.
- date
description: Date of first publication.
anyOf:
# Although schema.org says expected values are `Date`, for
# consistency with `dateCreated` and `dateModified` we allow
# for `DateTime` as well.
- $ref: Date
- type: string
format: date
- type: string
format: date-time
allOf:
- $ref: '#/definitions/dateProperty'
editors:
'@id': schema:editor
description: |
Expand Down Expand Up @@ -159,3 +157,15 @@ properties:
anyOf:
- type: string
- type: number
definitions:
dateProperty:
# Schema for data properties
# Although schema.org says expected values are `Date`, for
# consistency with `dateCreated` and `dateModified` we allow
# for `DateTime` as well.
anyOf:
- $ref: Date
- type: string
format: date
- type: string
format: date-time

0 comments on commit 788f0bf

Please sign in to comment.