CFLib.org – Common Function Library Project

goldenBirthday(birthday)

Last updated April 30, 2009

author

Joshua Siok

Version: 0 | Requires: CF6 | Library: DateLib

Description:
Returns a 'golden birthday', or the date when your birthday day of month equals your age.

Return Values:
Returns a date.

Example:

<cfoutput>#goldenBirthday(createDate(1973,4,8))#</cfoutput>

Parameters:

Name Description Required
birthday The date of birth. Yes

Full UDF Source:

<!---
 Returns a 'golden birthday', or the date when your birthday day of month equals your age.
 
 @param birthday 	 The date of birth. (Required)
 @return Returns a date. 
 @author Joshua Siok (jsiok@smp.org) 
 @version 0, April 30, 2009 
--->
<cffunction name="goldenBirthday" access="public" returntype="date">
	<cfargument name="birthDate" type="date" required="yes">
	<cfreturn dateAdd("yyyy", day(birthDate),birthDate)>
</cffunction>
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson