Symbol Methods
[Symbol.toPrimitive]
Signature
[Symbol.toPrimitive](hint: string): string | number
Parameters
hint
: Conversion hint ('number' or 'string')
Return Type
string | number
- Primitive value
Behavior
number
hint: Returns timestamp- Other hints: Returns ISO string
Example
+new Chronos(); // timestamp 1746866213184
`${new Chronos()}`; // ISO string 2025-05-10T14:37:20.105+06:00
[Symbol.toStringTag]
Signature
get [Symbol.toStringTag](): string
Return Type
string
- String tag
Notes
- Used by
Object.prototype.toString()