The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/firestore > / > Timestamp > toDate

Timestamp.toDate() method

Converts a Timestamp to a JavaScript Date object. This conversion causes a loss of precision since Date objects only support millisecond precision.

Signature:

toDate(): Date;

Returns:

Date

JavaScript Date object representing the same point in time as this Timestamp, with millisecond precision.