# isBeforeDate

Industry: Core

## Signature

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

Return true when `value1` is strictly before `value2` for PlainDate values.

- Uses Temporal.PlainDate.compare to compare dates.
- Returns false if either input is invalid.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value1` | `string` | ISO PlainDate string for the first value |
| `value2` | `string` | ISO PlainDate string for the second value |

## Returns

boolean indicating whether value1 &lt; value2

## Examples

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

isBeforeDate("2024-02-28", "2024-02-29") // true
```

## Source

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