---
title: nextAnniversary()
slug: nextanniversary
docTags: 
createdAt: 2021-09-14T17:47:18.000Z
---

Given a date, returns the next upcoming anniversary of that date.

### Syntax

`nextAnniversary(anniversaryDate, fromDate)`

- `anniversaryDate` - the `Date` value to be evaluated by the function.
- `fromDate` - (optional) the `Date` from which to find the next instance of anniversaryDate.
- **Return type:** [Date](docId\:xTAQdzvLBTAKjxRnpFwe9)&#x20;

### Sample usage

`nextAnniversary(birthDate)` returns the date one year after birthDate.

`nextAnniversary('2018-05-24', '2021-01-01')` returns `2021-05-24`.

### Supported data types

| **Input type**                            | **Return type**                         | **Logic**                                                                                                                                                                                                                                                             |
| ----------------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ****[Date](docId\:xTAQdzvLBTAKjxRnpFwe9)  | [Date](docId\:xTAQdzvLBTAKjxRnpFwe9)    | If a Date value is passed, the year will be incremented by 1. If the optional `fromDate` parameter is passed, the year will either increment or decrement by the difference in the year values, depending on whether `fromDate` is before or after `anniversaryDate`. |
| *Unsupported data types*                  | **[Null](docId\:N9trVqonnBknqL9DrNBP6)  | Unsupported data types return `Null`.                                                                                                                                                                                                                                 |

### Aliases

`birthday` returns the equivalent of `nextAnniversary(birthDate)`.

`anniversary` returns the equivalent of `nextAnniversary(startDate)`.



