# Module /glue/date-util

Business-day calendar helpers for workdays, weekends, and nth-weekday offset calculations.

```tangu
(use /glue/date-util)
```

## Functions & symbols

### compute-nth-weekday

`(compute-nth-weekday year month weekday n)`

Computes the `Date` of the `n`th occurrence of `weekday` (1..=7) in `year` and `month`, or `()` if outside the month.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `year` | `Any` | no | — |
| `month` | `Any` | no | — |
| `weekday` | `Any` | no | — |
| `n` | `Any` | no | — |

### ensure-work-day-max

`(ensure-work-day-max date)`

Moves `date` backward day-by-day until reaching the latest weekday (`<= date`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `date` | `Any` | no | — |

### ensure-work-day-min

`(ensure-work-day-min date)`

Advances `date` forward day-by-day until reaching the earliest weekday (`>= date`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `date` | `Any` | no | — |

### is-weekend-day?

`(is-weekend-day? date)`

Returns `true` if `date` falls on a weekend (Saturday or Sunday).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `date` | `Any` | no | — |

### is-work-day?

`(is-work-day? date)`

Returns `true` if `date` falls on a weekday (Monday through Friday).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `date` | `Any` | no | — |
