# toDate (@salmonui/calendars/calendar)

> The toDate function of @salmonui/calendars/calendar: 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/calendars/calendar/toDate

```ts
import { toDate } from '@salmonui/calendars/calendar';
```

Also exported from `@salmonui/calendars/date-picker`, `@salmonui/calendars/date-range-picker`, `@salmonui/calendars/time-picker`.

Entry index: https://salmonui.dev/docs/reference/calendars/calendar (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/calendars/calendar.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`.
