Skip to content

@serenity-is/corelib / splitDateString

Function: splitDateString()

splitDateString(s): string[]

Defined in: src/base/formatting.ts:974

Splits a date string into its numeric parts using the first detected separator.

Parameters

s

string

String to split; trimmed before inspection. null / empty yields null.

Returns

string[]

An array of substrings split by "/", ".", "-", or "\" (whichever appears first), or a single-element array when none of those separators is present.