# isBeforeUtc

Industry: Core

## Signature

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

Return whether `value1` represents an instant strictly before `value2`.

- Uses Temporal.Instant.compare to compare instants.
- Returns false if either input is invalid.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value1` | `string` | first UTC datetime string |
| `value2` | `string` | second UTC datetime string |

## Returns

`true` if `value1` is before `value2`, otherwise `false`

## Examples

```ts
import { isBeforeUtc } from "@northguild/gmt/utc/compare";

isBeforeUtc("2024-03-17T14:30:45Z", "2024-03-17T15:30:45Z") // true
```

## Source

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