pub trait DateValue:
Sized
+ Send
+ Sync
+ 'static {
// Required method
fn calendar_date(&self, zone: &TimeZone) -> Option<Date>;
// Provided methods
fn stored_text(&self) -> String { ... }
fn format_in(&self, cx: &Cx) -> String { ... }
}Expand description
The field types a DateColumn spells as a calendar day: jiff::civil::Date,
jiff::civil::DateTime, jiff::Timestamp (read in the request’s
time_zone, as a DateFilter reads it) and an
Option of any of them.
Required Methods§
Sourcefn calendar_date(&self, zone: &TimeZone) -> Option<Date>
fn calendar_date(&self, zone: &TimeZone) -> Option<Date>
The value’s calendar day in zone, None when it holds none. A civil value names its day
whatever the zone.
Provided Methods§
Sourcefn stored_text(&self) -> String
fn stored_text(&self) -> String
The value’s stored spelling, which a column’s text and export carry. The default spells the calendar day in UTC as an ISO date.
Sourcefn format_in(&self, cx: &Cx) -> String
fn format_in(&self, cx: &Cx) -> String
The value’s calendar day as a DateColumn cell spells it: in the request’s locale,
Oct 14, 2026 in English, and a timestamp’s in the request’s
time_zone. Empty when it holds none. For a page, a widget or a mail
that shows a date in the reader’s words rather than as ISO text in UTC.
use tablo_core::DateValue;
let renews: jiff::Timestamp = "2026-10-14T09:30:00Z".parse().unwrap();
let line = renews.format_in(cx); // "Oct 14, 2026", "14 oct. 2026" in FrenchDyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".