summaryrefslogtreecommitdiff
path: root/rust/actualbudget_models/src
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2024-11-26 20:27:53 +0000
committerJoe Carstairs <me@joeac.net>2024-11-26 20:32:18 +0000
commit58873c034847557122905cd893678eae5469b503 (patch)
tree64d72ec9241e442bdf26e71b475a458e88501dc8 /rust/actualbudget_models/src
parente07270da9f190171e6fdde556073d5af8691ca8e (diff)
Replaces DatetimeUtc with DateUtc where appropriate
Diffstat (limited to 'rust/actualbudget_models/src')
-rw-r--r--rust/actualbudget_models/src/actualbudget_date.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/rust/actualbudget_models/src/actualbudget_date.rs b/rust/actualbudget_models/src/actualbudget_date.rs
index c98accb..a5dc340 100644
--- a/rust/actualbudget_models/src/actualbudget_date.rs
+++ b/rust/actualbudget_models/src/actualbudget_date.rs
@@ -20,6 +20,10 @@ impl ActualbudgetDate {
format!("{0}-{1}-{2}T00:00:00.000Z", self.year(), self.month(), self.day())
}
+ pub fn to_iso_date(&self) -> String {
+ format!("{0}-{1}-{2}", self.year(), self.month(), self.day())
+ }
+
pub fn year(&self) -> String {
self.0.to_string()[0..4].to_string()
}