Skip to main content

temporal_from_value

Function temporal_from_value 

Source
pub fn temporal_from_value(v: &Value) -> Option<TemporalValue>
Expand description

Extract a TemporalValue from any Value variant that can represent one.

Handles Value::Temporal, Value::Map (JSON-serialized temporal wrappers), and Value::String — first tries JSON wrapper format ({"Date":{"days_since_epoch":0}}), then falls back to human-readable ISO 8601 strings like "2024-01-15" or "12:35:15+05:00".