From 097ece5df7a919c3f8098d0a6b0aaef8a8fc4a69 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 28 Nov 2026 03:46:54 +0100 Subject: [PATCH] thing-contract: is_timestamp_text, Thing's own documented timestamp-text check; CultLib's name is no longer re-exported Co-Authored-By: Claude Sonnet 5.5 --- crates/thing-contract/src/lib.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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.