voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
27 lines (15 loc) • 728 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/firestore](./firestore.md) > [/](./firestore_.md) > [Timestamp](./firestore_.timestamp.md) > [fromDate](./firestore_.timestamp.fromdate.md)
## Timestamp.fromDate() method
Creates a new timestamp from the given date.
<b>Signature:</b>
```typescript
static fromDate(date: Date): Timestamp;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| date | Date | The date to initialize the <code>Timestamp</code> from. |
<b>Returns:</b>
[Timestamp](./firestore_.timestamp.md)
A new `Timestamp` representing the same point in time as the given date.