ChronosChronos

getTimeStamp

Returns the timestamp (in milliseconds) of the Chronos instance.

getTimeStamp()

Note

  • The getter method timestamp and getTimeStamp() returns the same value (milliseconds).

  • The timestamp in seconds (which some people considers as timestamp) can be accessed using unix getter method.

Signature

getTimeStamp(): number

Return Type

number - Milliseconds since Unix epoch (January 1, 1970 UTC)

Behavior & Notes

  • Equivalent to JavaScript Date.getTime()
  • Returns the primitive timestamp value of the Chronos instance
  • 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)

On this page