Skip to content

getDayOfMonth

The getDayOfMonth() function returns the day of the month (1–31) for a TheDate with an optional timezone.

Interactive example

Syntax

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

Parameters

  • input: TheDate value.
  • timezone: Timezone (optional).

Return value

Day of the month (1–31) in the given timezone.

See also

Sources

Released under the MIT license.