summaryrefslogtreecommitdiff
path: root/schist_core/schist_models/src/date_utc.rs
diff options
context:
space:
mode:
authorjoeac <me@joeac.net>2026-02-28 08:50:46 +0000
committerjoeac <me@joeac.net>2026-02-28 08:50:46 +0000
commit342dadaf91093c1ce9c3ad248a2952ed3cde4de6 (patch)
tree0546aa27e558c498cbc730a6f1854f11e9fa844b /schist_core/schist_models/src/date_utc.rs
parent65596363d43995bf2002d4aa8405d84484f2542b (diff)
parentf3659bd8e9d5e20528aaa1e0e7c1b206fb0eb31c (diff)
Merge pull request 'task-085: view transactions in desktop GUI' (#5) from task-085 into main
Reviewed-on: https://git.joeac.net/joeac/schist/pulls/5
Diffstat (limited to 'schist_core/schist_models/src/date_utc.rs')
-rw-r--r--schist_core/schist_models/src/date_utc.rs5
1 files changed, 5 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..e4363a7 100644
--- a/schist_core/schist_models/src/date_utc.rs
+++ b/schist_core/schist_models/src/date_utc.rs
@@ -26,6 +26,7 @@ use crate::datetime_utc::DatetimeUtc;
Clone,
Copy,
Debug,
+ Hash,
AsExpression,
FromSqlRow,
)]
@@ -146,6 +147,10 @@ impl DateUtc {
}
return prev_guess;
}
+
+ pub fn format(&self, fmt: &str) -> String {
+ format!("{}", self.chrono_datetime_utc.format(fmt))
+ }
}
impl Nowlike for DateUtc {