# isBetweenYears Type documentation

## TypeScript declaration

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

**Kind:** constant

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

Compare the current year is between start and end year. from \< current \< to

```
(current: Date, from?: Date | undefined, to?: Date | undefined) => boolean = ...
```

```
isBetweenYears(current: Date, from?: Date, to?: Date): boolean
```

Compare the current year is between start and end year. from \< current \< to

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [current](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/date-time-helper.ts#L665-L665>) | `Date` |  |  |
| [from](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/date-time-helper.ts#L665-L665>) (optional) | `Date` |  |  |
| [to](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/date-time-helper.ts#L665-L665>) (optional) | `Date` |  |  |

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