Skip to main content

Function: joinStartAndEnd()

joinStartAndEnd(startText, endText, separator?): string

Defined in: time/format.ts:130

Joins a start text and an end text into one line. An empty text is a missing side: the start alone reads Mar 2, 2026 –, the end alone – Mar 4, 2026, and neither gives '', so the caller picks its own empty text. Two texts that read the same show once.

Parameters​

startText​

string

endText​

string

separator?​

string = ' – '

Returns​

string