From 94dc566d3ff3723f08d5511072ab54140f0e372b Mon Sep 17 00:00:00 2001 From: Sven Taute Date: Mon, 19 Sep 2022 03:35:54 +0200 Subject: [PATCH] Fix bug in time::month() (#215) --- lib/src/fnc/time.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/fnc/time.rs b/lib/src/fnc/time.rs index 4a0a34e7..ad3cf2f2 100644 --- a/lib/src/fnc/time.rs +++ b/lib/src/fnc/time.rs @@ -89,9 +89,9 @@ pub fn mins(_: &Context, mut args: Vec) -> Result { pub fn month(_: &Context, mut args: Vec) -> Result { match args.len() { - 0 => Ok(Utc::now().day().into()), + 0 => Ok(Utc::now().month().into()), _ => match args.remove(0) { - Value::Datetime(v) => Ok(v.day().into()), + Value::Datetime(v) => Ok(v.month().into()), _ => Ok(Value::None), }, }