max
Returns the latest Chronos instance based on the underlying universal timestamp.
max()
Returns the latest Chronos instance based on the underlying universal timestamp.
Signature
static max(...dates: ChronosInput[]): ChronosParameters
dates: Dates to compare
Return Type
Chronos - Latest moment (new instance)
Example
playground.ts
Notes
- All inputs are normalized to
Chronosinstances before comparison. - Comparison is always performed using each instance's UTC timestamp, ensuring a consistent and timezone-agnostic result.
- When exactly two values are provided, the first value becomes the initial candidate; if the second value represents a later moment in time, it replaces the candidate.
- The returned value is not one of the input values. A new immutable
Chronosinstance is always created. Its internal timezone, offset, name, and tracking information are cloned from the winning input instance.
Last updated: Tue, Jun 23, 2026 07:34:42PM (UTC)
