getTimeStamp
Returns the timestamp (in milliseconds) of the Chronos instance.
getTimeStamp()
Signature
getTimeStamp(): numberReturn Type
number - Milliseconds since Unix epoch (January 1, 1970 UTC)
Behavior & Notes
- Equivalent to JavaScript
Date.getTime() - Returns the primitive timestamp value of the
Chronosinstance - Useful for interoperability with other date libraries or storage
Example
playground.ts
Use Cases
- Storing dates in databases as timestamps
- Performance-critical operations where primitive numbers are preferred
- Interfacing with systems that expect Unix timestamps
Last updated: Thu, May 21, 2026 09:14:30AM (UTC)
