aboutsummaryrefslogtreecommitdiff
path: root/apps/cassiopeia/src/time.rs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/cassiopeia/src/time.rs')
-rw-r--r--apps/cassiopeia/src/time.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/cassiopeia/src/time.rs b/apps/cassiopeia/src/time.rs
index 0161742a0c92..a5147b93aaac 100644
--- a/apps/cassiopeia/src/time.rs
+++ b/apps/cassiopeia/src/time.rs
@@ -47,6 +47,15 @@ impl Time {
}
}
+ /// Get the time that might be rounded to the next 15 minutes
+ pub(crate) fn rounded(r: bool) -> Self {
+ if r {
+ Time::now().round()
+ } else {
+ Time::now()
+ }
+ }
+
pub(crate) fn date(&self) -> chrono::Date<Offset> {
self.inner.date()
}