Compare commits

..

No commits in common. "9ce77897d874509e1f5bfca772802be874d5be22" and "97a3a243787855100e5cdc7ce270b6ff88c86499" have entirely different histories.

3 changed files with 335 additions and 226 deletions

530
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -7,22 +7,22 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
chrono = { version = "0.4.39", features = ["serde", "unstable-locales"] }
dioxus = { version = "0.6.1", features = ["fullstack", "router"] }
feruca = { version = "0.10.1" }
serde = { version = "1.0.217" }
serde_json = { version = "1.0.134" }
serde_with = { version = "3.12.0", features = ["chrono_0_4"] }
tracing = "0.1.41"
chrono = { version = "0.4.38", features = ["serde", "unstable-locales"] }
dioxus = { version = "0.6.0", features = ["fullstack", "router"] }
feruca = { version = "0.10.0" }
serde = { version = "1.0.208" }
serde_json = { version = "1.0.125" }
serde_with = { version = "3.9.0", features = ["chrono_0_4"] }
tracing = "0.1.40"
unic-langid-impl = { version = "0.9.5", features = ["serde"] }
validator = { version = "0.19.0", features = ["derive"] }
diesel = { version = "2.2.6", features = ["chrono", "postgres", "postgres_backend", "serde_json"], optional = true }
diesel = { version = "2.2.2", features = ["chrono", "postgres", "postgres_backend", "serde_json"], optional = true }
diesel_migrations = { version = "2.2.0", features = ["postgres"], optional = true }
dotenvy = { version = "0.15.7", optional = true }
time = { version = "0.3.37", optional = true }
time = { version = "0.3.36", optional = true }
async-std = { version = "1.13.0", optional = true }
async-std = { version = "1.12.0", optional = true }
dioxus-i18n = { version = "0.3.0", optional = true }
dioxus-query = { version = "0.6.0", optional = true }
voca_rs = { version = "1.15.2", optional = true }

View File

@ -19,7 +19,7 @@ use diesel::prelude::*;
use diesel::{ExpressionMethods, OptionalExtension, QueryDsl, RunQueryDsl, SelectableHelper};
use dioxus::prelude::*;
#[cfg(feature = "server")]
use time::Month;
use time::util::days_in_year_month;
#[cfg(feature = "server")]
use validator::Validate;
@ -178,11 +178,10 @@ pub(crate) async fn complete_task(task_id: i32) -> Result<Task, ServerFnError<Er
*date = NaiveDate::from_ymd_opt(
date.year(),
date.month(),
reoccurrence.start_date().day().min(
Month::try_from(date.month() as u8)
.unwrap()
.length(date.year()) as u32,
),
reoccurrence.start_date().day().min(days_in_year_month(
date.year(),
(date.month() as u8).try_into().unwrap(),
) as u32),
)
.unwrap()
}