# getFirstDayInMonth Type documentation

## TypeScript declaration

### [getFirstDayInMonth](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/date-time-helper.ts#L106-L107>)

**Kind:** constant

```
import { getFirstDayInMonth } from '@siemens/element-ng/datepicker';
```

Gets the first day in the specified month. Expects the month as a value between 1 and 12. The year is required to handle leap years.

Returns: The first day of the month as a Date.

```
(year: number, month: number) => Date = ...
```

```
getFirstDayInMonth(year: number, month: number): Date
```

Gets the first day in the specified month. Expects the month as a value between 1 and 12. The year is required to handle leap years.

Returns: The first day of the month as a Date.

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [year](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/date-time-helper.ts#L106-L106>) | `number` |  |  |
| [month](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/date-time-helper.ts#L106-L106>) | `number` |  |  |

**Returns:** [Date](<https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date>)
