ColdFusion Date Math Faster Than Date Methods... And Other Date/Math Ramblings

<!--- Test the CreateDate() method. --->
<cftimer label="Date Methods" type="outline">
	 
	<!--- Loop for time testing. --->
	<cfloop index="intI" from="1" to="10000" step="1">
		 
		<!--- Get Now for less method calls. --->
		<cfset dtNow = Now() />
		 
		<!--- Create a date-only date object. --->
		<cfset dtToday = CreateDate(
			Year( dtNow ),
			Month( dtNow ),
			Day( dtNow )
			) />
	 
	</cfloop>
	 
	<!--- Output for feedback. --->
	#DateFormat( dtToday )#
 
</cftimer>
 
 
<!--- Test the fractional math method. --->
<cftimer label="Date Math" type="outline">
	 
	<!--- Loop for time testing. --->
	<cfloop index="intI" from="1" to="10000" step="1">
		 
		<!--- Create the date-only object. --->
		<cfset dtToday = Int( Now() ) />
	 
	</cfloop>
	 
	<!--- Output for feedback. --->
	#DateFormat( dtToday )#
 
</cftimer>

For Cut-and-Paste