FIX: Dates are only valid up to the last day of 9999

This commit is contained in:
Nicolás Hatcher
2024-12-30 12:50:33 +01:00
committed by Nicolás Hatcher Andrés
parent d04691b790
commit c6adf8449b
6 changed files with 54 additions and 8 deletions

View File

@@ -0,0 +1,15 @@
#![allow(clippy::unwrap_used)]
use crate::test::util::new_empty_model;
#[test]
fn test_fn_date_arguments() {
let mut model = new_empty_model();
model._set("A1", "=DAY(95051806)");
model._set("A2", "=DAY(2958465)");
model.evaluate();
assert_eq!(model._get_text("A1"), *"#NUM!");
assert_eq!(model._get_text("A2"), *"31");
}