ganit-core 0.3.10

Spreadsheet formula engine — parser and evaluator for Excel-compatible formulas
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use super::super::*;
use crate::types::Value;

#[test]
fn integer_part_equals_today_floor() {
    // The integer portion of NOW() must match the date (no fractional spillover).
    if let Value::Number(n) = now_fn(&[]) {
        assert!(n.floor() >= 45292.0, "date portion {} seems too small", n.floor());
    } else {
        panic!("expected Number");
    }
}