# isSameOrBefore Type documentation

## TypeScript declaration

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

**Kind:** constant

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

Is first date equal or before the second date (without considering the time). current \>= compareTo

```
(current: Date, compareTo: Date) => boolean = ...
```

```
isSameOrBefore(current: Date, compareTo: Date): boolean
```

Is first date equal or before the second date (without considering the time). current \>= compareTo

#### Parameters

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

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