aboutsummaryrefslogtreecommitdiff
path: root/apps/cassiopeia/src/date.rs
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-12-15 19:41:48 +0000
committerMx Kookie <kookie@spacekookie.de>2020-12-15 19:41:48 +0000
commitd7fff0b83e0bc931e29a3e64c1f978a09a3fd429 (patch)
tree6328b2700e74fae191967391c9f8f6b054c36c1a /apps/cassiopeia/src/date.rs
parentbfe67afa8a9238bd2a3bfdc9079917c81c8cfef3 (diff)
cassiopeia: finishing up version 0.3.0
This commit does kind of a lot to get cass(1) over the finish line. For one it implements all the CLI functions (well, almost all) with their respective parameters, and also creates a new `gen` module which uses the IR stream to generate a new file based on the old one, while updating header fields that need to be updated (currently only `version`). This version does nothing with the actual header values, and probably has a lot of bugs. More documentation will follow in future cassiopeia commits.
Diffstat (limited to 'apps/cassiopeia/src/date.rs')
-rw-r--r--apps/cassiopeia/src/date.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/cassiopeia/src/date.rs b/apps/cassiopeia/src/date.rs
index 00d8a700859a..df366f6717aa 100644
--- a/apps/cassiopeia/src/date.rs
+++ b/apps/cassiopeia/src/date.rs
@@ -24,3 +24,10 @@ impl From<NaiveDate> for Date {
Self { inner }
}
}
+
+
+impl ToString for Date {
+ fn to_string(&self) -> String {
+ format!("{}", self.inner.format("%Y-%m-%d"))
+ }
+}