~whereswaldon/arborchat

a510daa9b98c67bfc1487c08508a095070acf61b — Andrew Thorp 6 months ago cb59918
Add expiration specification
A specifications/twig-extensions/expiration/README.md => specifications/twig-extensions/expiration/README.md +10 -0
@@ 0,0 1,10 @@
# Expiration

Expiration encodes an expiration date-time.
A node that contains this metadata field should not be valid/relevant after the encoded date-time.

# Usage
Expiration is designed to be somewhat atomic.
It doesn't strictly rely on any other twig extensions and can be used as a building block for more complex behavior.

An example API usage would check the expiration data/date and determine if the node is expired or not: `expiration.isExpired(node)`.

A specifications/twig-extensions/expiration/spec.toml => specifications/twig-extensions/expiration/spec.toml +5 -0
@@ 0,0 1,5 @@
key-name = "expiration"

[version.1.data]
type = "string"
description = "A stringified date-time representing an expiration date and time. RFC 3339 formatted."