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

# Get Date Occurrence

> Get the next or nearest yearly occurrence of a date

## Overview

The `get-date-occurence` transformation finds the next (or nearest) occurrence of a date in the current or next year. This is useful for recurring events like birthdays or anniversaries.

## Syntax

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
get-date-occurence(<variable>)
```

## Parameters

| Parameter     | Type    | Required | Description                                                                                    |
| ------------- | ------- | -------- | ---------------------------------------------------------------------------------------------- |
| `variable`    | date    | Yes      | The reference date                                                                             |
| `inputLocale` | string  | No       | Locale used to parse the input date: `"pt"`, `"nl"`, `"en"`, `"de"`, `"ja"`, `"zh"`, or `"fr"` |
| `useNearest`  | boolean | No       | When true, returns the nearest occurrence (past or future) instead of always the next one      |

## Examples

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
get-date-occurence(<variable>)
get-date-occurence(<variable>, useNearest=true)
get-date-occurence(<variable>, inputLocale="fr")
```
