# toDate (@salmonui/core/dates)

> The toDate function of @salmonui/core/dates: The Date (instant) of a plain date or date-time: its wall time in timeZone (DST resolved like Temporal 'compatible'), else in the host zone. An invalid value or zone gives an invalid Date.

Canonical: https://salmonui.dev/docs/reference/core/dates/toDate

```ts
import { toDate } from '@salmonui/core/dates';
```

Entry index: https://salmonui.dev/docs/reference/core/dates (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/core/dates.md).

## Reference

Kind: function

```ts
function toDate(value: PlainDateLike & Partial<PlainTimeLike>, timeZone?: string): Date;
```

The `Date` (instant) of a plain date or date-time: its wall time in
`timeZone` (DST resolved like Temporal `'compatible'`), else in the host
zone. An invalid value or zone gives an invalid `Date`.
