📅Get Date or String

getDateOrString ⇒ string

Gets a formatted date string or returns the input as is.

Kind: global variable Returns: string - The formatted date string or the original input.

ParamTypeDefaultDescription

dateInput

string | Date

The date to format. Can be a date string (ISO 8601) or a Date object.

createdTimestamp

number

A fallback timestamp to use if dateInput is undefined or null.

[localDateType]

string

"'en'"

The locale for the date format (default is English).

Last updated