IsAnniversaryAt (open)

Return whether today is the anniversary of something

Syntax

LOADLIB "wh::datetime.whlib";

BOOLEAN FUNCTION IsAnniversaryAt(DATETIME creation_date, DATETIME date)

Parameters

DATETIME creation_date

Creation date

DATETIME date

Compare date (the date to check for next anniversaries)

Return value

BOOLEAN

TRUE when today is an anniversary, FALSE if not

Description

This function returns the whether today is an anniversary, given the creation date of something

Examples

// See if today is Bob's anniversary (with Bob born at 31 jan 2008)
BOOLEAN val1 := IsAnniversaryAt(MakeDate(2008,1,31), GetCurrentDateTime());

// See if today is Bob's anniversary in the CET timezone (with Bob born at 31 jan 2008)
BOOLEAN val2 := IsAnniversaryAt(MakeDate(2008,1,31), UTCToLocal(GetCurrentDateTime(), "CET"));