diff options
Diffstat (limited to 'schist_core/schist_models/src/date_utc.rs')
| -rw-r--r-- | schist_core/schist_models/src/date_utc.rs | 5 |
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 { |
