CFLib.org – Common Function Library Project

GetAscension([TheYear])

Last updated October 5, 2001

Version: 1 | Requires: ColdFusion 5 | Library: DateLib

 
Rated 0 time(s). Average Rating: 0

Description:
Returns the date for Ascension in a given year. If no year is specified, defaults to the current year.

Return Values:
Returns a date object.

Example:

view plain print about
<CFOUTPUT>
Ascension falls/fell on #DateFormat(GetAscension(), 'dddd mmmm dd, yyyy')# this year.
</CFOUTPUT>

Parameters:

Name Description Required
TheYear Year you want to get Ascension for. No

Full UDF Source:

view plain print about
<cfscript>
/**
 * Returns the date for Ascension in a given year.
 * This function requires the GetEaster() function available from the DateLib library.
 * 
 * @param TheYear      Year you want to get Ascension for. 
 * @return Returns a date object. 
 * @author Beau A.C. Harbin (bharbin@figleaf.com) 
 * @version 1.0, October 5, 2001 
 */

function GetAscension() {
  Var TheYear=Year(Now());
  if(ArrayLen(Arguments)) 
    TheYear = Arguments[1];
  Return DateAdd("d", 39, GetEaster(TheYear));
}
</cfscript>
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Dave Anderson Dave Anderson added
iniToStruct
20 day(s) ago

Dave Anderson Dave Anderson added
deDupeArray
20 day(s) ago

Richard Richard added
dice
22 day(s) ago

Isaac Dealey Isaac Dealey added
getRelative
a while ago

Top Rated

Darwan Leonardo Sitepu backupDatabase
Rated 5.0, 22 time(s)

Barney Boisvert indentXml
Rated 5.0, 10 time(s)

Kevin Pepperman generateSsccAsn
Rated 5.0, 4 time(s)

Raymond Camden highlightAndCrop
Rated 5.0, 4 time(s)

Created by Raymond Camden / Design by Justin Johnson