# weekOfYearForDateTime

Industry: Core

## Signature

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

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

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

## Parameters

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

## Returns

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

## Examples

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

weekOfYearForDateTime("2024-01-01T12:00:00") // 1
```

## Source

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