# areDateTimesEqual

Industry: Core

## Signature

```ts
areDateTimesEqual(value1: string, value2: string): boolean
```

Return true if two PlainDateTime ISO strings represent the same instant of local date/time components.

- Compares all date and time components.
- Returns false if either input is invalid.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value1` | `string` | first ISO PlainDateTime string |
| `value2` | `string` | second ISO PlainDateTime string |

## Returns

boolean indicating whether both date-times are equal component-wise

## Examples

```ts
import { areDateTimesEqual } from "@northguild/gmt/plain/compare";

areDateTimesEqual("2024-02-29T12:34:56", "2024-02-29T12:34:56") // true
```

## Source

[plain/compare/areDateTimesEqual.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/plain/compare/areDateTimesEqual.ts)
