Dates have no dedicated variant. They are stored as Number values with a
number format applied. Use FormulaContext.isValidDate to distinguish them
at runtime. InteropScalarType extends this enum with a Date variant for
API boundaries that accept JavaScript Date objects.
Date.
Identifies which variant of Scalar a cell value is.
Because
Scalaris a union type,ScalarTypegives you a safe, string-based discriminant for branching on value kind — useful in formula implementations, data-profiling UIs, and type-coercion logic without relying ontypeoforinstanceofchecks that do not cover all cases (e.g.null,FormulaError,IRichData).