website logo
ChartHop documentation
Carrot reference
Release notes
Navigate through spaces
ChartHop documentation
Carrot reference
Release notes
⌘K
Getting started
Getting started with Carrot
Operator precedence
Filtering with Carrot
Data categories
Basic Org Information
Compensation
Job Changes
Permissions
Personal
Recruiting
Structure
Time off
Data types
Address
Boolean
Comp
Comp Band
Currency
Date
DateTime
DaysOff
Enum
EnumList
File
Group
Image
Job
List
Money
Name
Number
Null
Percent
Person
PersonList
Shares
StockGrant
String
TimeOff
User
Operators
+ (add)
- (subtract)
* (multiply)
/ (divide)
% (modulus)
&& (and)
|| (or)
if
: (match)
= (equals)
!= (not-equals)
! (not)
> (greater-than)
>= (greater-than-equals)
< (less-than)
<= (less-than-equals)
[ ](array)
. (dot)
? (ternary)
?: (elvis)
Functions
abs()
asOf()
boolean()
compHistory()
compBetween()
costBetween()
date()
day()
daysOffBetween()
diffYears()
diffMonths()
distance()
monthEnd()
formatMoney()
formatRound()
formatNumber()
formatPercent()
formatDate()
grantedShares()
length()
max()
mean()
money()
month()
min()
nextAnniversary()
number()
pluralize()
percent()
random()
round()
roundUp()
roundDown()
string()
subString()
stockPrice()
monthStart()
split()
vestValue()
vestShares()
year()
Aggregators
count{}
max{}
mean{}
min{}
sum{}
Docs powered by archbee 
5min

nextAnniversary()

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

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

Date

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

Unsupported data types return Null.

Aliases

birthday returns the equivalent of nextAnniversary(birthDate).

anniversary returns the equivalent of nextAnniversary(startDate).



Updated 07 Dec 2021
Did this page help you?
Yes
No
UP NEXT
number()
Docs powered by archbee 
TABLE OF CONTENTS
Syntax
Sample usage
Supported data types
Aliases