isEqual method

bool isEqual(
  1. ZonedDateTime other
)

Checks if this date-time represents the same instant as another.

Example:

final ny = ZonedDateTime.parse('2023-12-25T12:00:00-05:00[America/New_York]');
final london = ZonedDateTime.parse('2023-12-25T17:00:00+00:00[UTC]');

print(ny.isEqual(london)); // true (same instant, different zones)

Implementation

bool isEqual(ZonedDateTime other) => compareTo(other) == 0;