# weekOfYearForDate

Industry: Core

## Signature

```ts
weekOfYearForDate(value: string): number | null
```

Return the ISO week number for a given ISO 8601 date string.

- Uses Temporal.PlainDate.weekOfYear (Monday-based ISO weeks).
- Returns null for invalid input.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `string` | ISO 8601 date string |

## Returns

Week number (1-53) or null on invalid input

## Examples

```ts
import { weekOfYearForDate } from "@northguild/gmt/plain/calculate";

weekOfYearForDate("2024-01-01") // 1
```

## Source

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