diff --git a/Cargo.lock b/Cargo.lock index 132bfdee9..4b0753fc0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1017,10 +1017,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -1452,9 +1450,9 @@ dependencies = [ [[package]] name = "julian_day_converter" -version = "0.3.4" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5c45e06fa273ed7800f954d1cb6054b9b07115b370da56185f506700c0e3aa" +checksum = "1aa5652b85ab018289638c6b924db618da9edd2ddfff7fa0ec38a8b51a9192d3" dependencies = [ "chrono", ] diff --git a/core/Cargo.toml b/core/Cargo.toml index 3e6a3009b..29d67ec23 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -49,11 +49,12 @@ libc = "0.2.155" log = "0.4.20" sqlite3-parser = { path = "../vendored/sqlite3-parser" } thiserror = "1.0.61" -getrandom = { version = "0.2.15", features = ["js"] } +getrandom = { version = "0.2.15" } regex = "1.11.1" regex-syntax = { version = "0.8.5", default-features = false, features = ["unicode"] } -chrono = "0.4.38" julian_day_converter = "0.3.2" +chrono = { version = "0.4.38", default-features = false, features = ["clock"] } +julian_day_converter = "0.4.4" jsonb = { version = "0.4.4", optional = true } indexmap = { version = "2.2.6", features = ["serde"] } serde = { version = "1.0", features = ["derive"] } @@ -75,7 +76,7 @@ crossbeam-skiplist = "0.1.3" ryu = "1.0.19" [build-dependencies] -chrono = "0.4.38" +chrono = { version = "0.4.38", default-features = false } built = { version = "0.7.5", features = ["git2", "chrono"] } [target.'cfg(not(target_family = "windows"))'.dev-dependencies] diff --git a/core/functions/datetime.rs b/core/functions/datetime.rs index aeac63337..9a65bcb2f 100644 --- a/core/functions/datetime.rs +++ b/core/functions/datetime.rs @@ -1536,11 +1536,13 @@ mod tests { #[allow(deprecated)] #[test] fn test_apply_modifier_julianday() { + use julian_day_converter::*; + let dt = create_datetime(2000, 1, 1, 12, 0, 0); - let julian_day = julian_day_converter::datetime_to_julian_day(&dt.to_string()).unwrap(); + let julian_day = &dt.to_jd(); let mut dt_result = NaiveDateTime::default(); - if let Ok(result) = julian_day_converter::julian_day_to_datetime(julian_day) { - dt_result = result; + if let Some(ndt) = JulianDay::from_jd(*julian_day) { + dt_result = ndt; } assert_eq!(dt_result, dt); }