Home

Date Time

This is an implementation of schema.org DateTime.

In Stencila Schema it is represented as a typed node so combined date-time values can be validated, serialized, and attached to document metadata and execution events. This is especially useful where timestamps need to remain distinct from plain strings.

See also Date, Time, and Timestamp.

Analogues

The following external types, elements, or nodes are similar to a DateTime:

  • schema.org DateTime

  • RFC 3339 date-time: Close serialization analogue for full date-time strings, though Stencila models them as typed nodes.

Properties

The DateTime type has these properties:

NameDescriptionTypeInherited from
valueThe date as an ISO 8601 string.String-
idThe identifier for this item.StringEntity

Related

The DateTime type is related to these types:

Bindings

The DateTime type is represented in:

Testing

During property-based (a.k.a generative) testing, the properties of the DateTime type are generated using the following strategies.

PropertyComplexityDescriptionStrategy
valueMin+Generate a fixed date-time string.String::from("2022-02-22T22:22:22")
Low+Generate a random date-time string.Regex [0-9]{4}-[01][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9]+([+-][0-2][0-9]:[0-5][0-9]|Z)
High+Generate a random string of up to 20 alphanumeric characters, colons & hyphens.Regex [a-zA-Z0-9\-:]{1,20}
MaxGenerate an arbitrary string.String::arbitrary()

This documentation was generated from DateTime.yaml by docs_types.rs.

© 2026 Stencila