Loading documentation…
Parse a user-typed date string into a serial, or null when it is not a date.
Accepted forms:
yyyy-mm-dd (e.g. 2026-07-06);yyyy-mm-dd hh:mm or yyyy-mm-dd hh:mm:ss (a T separator is
also accepted); the fractional serial carries the time;dd/mm/yyyy and mm/dd/yyyy, disambiguated conservatively: if one
component exceeds 12 it must be the day and the layout is unambiguous; when
both are ≤ 12 the value is ambiguous (e.g. 04/05/2026) and is read as
mm/dd — Google Sheets' default (US) locale. Both > 12 is rejected.Anything else (bare numbers, free text) returns null so callers can fall back
to a text literal.
function parseDateInput(raw: string): number | nullWorkspace packages depending on @sheetwrite/core
@sheetwrite/benchdependency@sheetwrite/docs-startdependency@sheetwrite/reactdependency@sheetwrite/sveltedependency@sheetwrite/vuedependency@sheetwrite/xlsxdependencyPublic exports naming parseDateInput