---
id: fast-foundation.dateformatter.getdateobject
title: DateFormatter.getDateObject() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-foundation](./fast-foundation.md) &gt; [DateFormatter](./fast-foundation.dateformatter.md) &gt; [getDateObject](./fast-foundation.dateformatter.getdateobject.md)

## DateFormatter.getDateObject() method

Helper function to make sure that the DateFormatter is working with an instance of Date

<b>Signature:</b>

```typescript
getDateObject(date: {
        day: number;
        month: number;
        year: number;
    } | string | Date): Date;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  date | { day: number; month: number; year: number; } \| string \| Date | The date as an object, string or Date insance |

<b>Returns:</b>

Date

- A Date instance
