# daysInMonth Type documentation

## TypeScript declaration

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

**Kind:** constant

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

Get number of days for the given month and year.

Returns: the number of days for the given month.

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

```
daysInMonth(month: number, year: number): number
```

Get number of days for the given month and year.

Returns: the number of days for the given month.

#### Parameters

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

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