diff --git a/crates/thing-contract/src/lib.rs b/crates/thing-contract/src/lib.rs index 62085b9..0e0832e 100644 --- a/crates/thing-contract/src/lib.rs +++ b/crates/thing-contract/src/lib.rs @@ -33,7 +33,14 @@ pub use result::*; pub use source::*; pub use style::*; -pub use cultcache_rs::{DatabaseEntry, is_stored_at_stamp}; +pub use cultcache_rs::DatabaseEntry; + +/// Whether `text` is an RFC 3339 UTC-or-offset date-time of the one shape a Thing timestamp is +/// written in (`YYYY-MM-DDThh:mm:ss`, an optional fraction, then `Z` or an offset). A timestamp a +/// provider publishes as text is shown as written only when this accepts it. +pub fn is_timestamp_text(text: &str) -> bool { + cultcache_rs::is_stored_at_stamp(text) +} use cultcache_rs::{CultCache, CultCacheRegistry}; /// Registers the five kinds with a cache.