GetNextAnniversary (open)

Calculate the date of the next anniversary of something

Syntax

LOADLIB "wh::datetime.whlib";

DATETIME FUNCTION GetNextAnniversary(DATETIME creation_date, DATETIME date)

Parameters

DATETIME creation_date

Creation date

DATETIME date

Compare date (the date from which to look for the next anniversary)

Return value

DATETIME

A DateTime value representing the next anniversary of something started on creation_date, relative to the given date.

Description

This function returns the date of the next anniversary, given the creation date of something

Examples

// Look up Bob's next birthday
DATETIME bobs_birthday := GetNextAnniversary(MakeDate(2008,1,31), GetCurrentDateTime());