> ## Documentation Index
> Fetch the complete documentation index at: https://docs.law4devs.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Compliance Deadlines

> Fetch compliance deadlines for EU frameworks with the Law4Devs PHP SDK.

## Overview

Compliance deadlines are structured dates extracted from regulatory texts, indicating when specific obligations must be met. Use `$client->compliance` to access them.

***

## Methods

### `list()`

Returns a page of compliance deadlines for a framework.

```php theme={null}
$page = $client->compliance->list('nis2');

foreach ($page->data as $deadline) {
    printf("  [%s] %s — %s\n",
        $deadline->deadlineDate,
        $deadline->deadlineType,
        $deadline->description ?? 'No description',
    );
}
```

**Returns** `Page<ComplianceDeadline>`

***

### `iter()`

Iterate over all compliance deadlines in a framework.

```php theme={null}
foreach ($client->compliance->iter('dora') as $deadline) {
    echo $deadline->deadlineDate . ': ' . $deadline->description . "\n";
}
```

**Returns** `\Generator<ComplianceDeadline>`

***

## Model

### `ComplianceDeadline`

| Field           | Type           | Description                                   |
| --------------- | -------------- | --------------------------------------------- |
| `id`            | `int`          | Internal numeric ID                           |
| `frameworkSlug` | `string`       | Parent framework slug                         |
| `articleNumber` | `string\|null` | Source article number                         |
| `paragraphRef`  | `string\|null` | Paragraph reference                           |
| `deadlineDate`  | `string`       | ISO 8601 date                                 |
| `deadlineType`  | `string`       | Type, e.g. `'transposition'`, `'application'` |
| `description`   | `string\|null` | Human-readable description of the obligation  |

***

## Example

### Print all upcoming deadlines sorted by date

```php theme={null}
$deadlines = [];
foreach ($client->compliance->iter('nis2') as $d) {
    $deadlines[] = $d;
}

usort($deadlines, fn($a, $b) => $a->deadlineDate <=> $b->deadlineDate);

foreach ($deadlines as $d) {
    printf("[%s] %s\n", $d->deadlineDate, $d->description ?? $d->deadlineType);
}
```
