diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2017-09-16 12:36:47 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2017-09-16 12:36:47 +0200 |
commit | 3a4b2bde8056339744372757e1fed4bf15cf3302 (patch) | |
tree | 0734a2b012fa9fb64f5e4f4db2b13291b6e162e0 | |
parent | a0f82c62916e26804ef38e6584e9b75f383cb485 (diff) |
Add TimeType::today()
-rw-r--r-- | src/timetype.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/timetype.rs b/src/timetype.rs index b0a5967..05d9015 100644 --- a/src/timetype.rs +++ b/src/timetype.rs @@ -93,6 +93,11 @@ impl SubAssign for TimeType { /// impl TimeType { + /// Alias for `TimeType::moment(::chrono::offset::Local::now().naive_local())` + pub fn today() -> TimeType { + TimeType::moment(::chrono::offset::Local::now().naive_local()) + } + pub fn is_a_amount(&self) -> bool { match *self { TimeType::Seconds(_) | |