---
id: fast-foundation.calendar.dateinstring
title: Calendar.dateInString() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-foundation](./fast-foundation.md) &gt; [Calendar](./fast-foundation.calendar.md) &gt; [dateInString](./fast-foundation.calendar.dateinstring.md)

## Calendar.dateInString() method

A helper function that checks if a date exists in a list of dates

<b>Signature:</b>

```typescript
dateInString(date: Date | string, datesString: string): boolean;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  date | Date \| string | A date objec that includes the day, month and year |
|  datesString | string | a comma separated list of dates |

<b>Returns:</b>

boolean

- Returns true if it found the date in the list of dates
