[**@bondsports/general**](../README.md) • **Docs**

***

[@bondsports/general](../globals.md) / convertToDate

# Function: convertToDate()

> **convertToDate**(`dayAndMonth`, `year`): `Date`

Converts a string representing a day and month to a Date object.
The expected format for the input string is 'day/month'.

## Parameters

• **dayAndMonth**: `string`

The string representing the day and month.

• **year**: `number` = `START_YEAR`

The year to use for the Date object (default: 2000).

## Returns

`Date`

A Date object representing the converted day and month.

## Defined in

[validations/pricing/date-time.utils.ts:16](https://github.com/Bond-Sports/bondUtils/blob/545f16ceb055481acfd7641d7809c0f252d3a5e6/packages/general/src/validations/pricing/date-time.utils.ts#L16)
