Skip to content

getSecond

The getSecond() function returns the seconds (0–59) of a TheDate, adjusted by an optional time zone.

Interactive example

Syntax

typescript
function getSecond<
	GenericInput extends TheDate
>(
	input: GenericInput,
	timezone?: Timezone
): number

Parameters

  • input: Target TheDate.
  • timezone: IANA zone (optional).

Return value

Seconds between 0 and 59.

See also

Sources

Released under the MIT license.