summaryrefslogtreecommitdiff
path: root/schist_core
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-02-22 08:15:36 +0000
committerJoe Carstairs <me@joeac.net>2026-02-22 08:15:36 +0000
commitb3d80680c0ac19df7a810ade6f76cabf1005e914 (patch)
tree772012d25cbda10c49fafac6bfe90b59c7ef0112 /schist_core
parentd119e7d7ba41ce7ee479336ce5de287ef62a2737 (diff)
task-085: format dates
Diffstat (limited to 'schist_core')
-rw-r--r--schist_core/schist_models/src/date_utc.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/schist_core/schist_models/src/date_utc.rs b/schist_core/schist_models/src/date_utc.rs
index 927644c..658a8dd 100644
--- a/schist_core/schist_models/src/date_utc.rs
+++ b/schist_core/schist_models/src/date_utc.rs
@@ -146,6 +146,10 @@ impl DateUtc {
}
return prev_guess;
}
+
+ pub fn format(&self, fmt: &str) -> String {
+ format!("{}", self.chrono_datetime_utc.format(fmt))
+ }
}
impl Nowlike for DateUtc {