Using a book by CF guru Ben Forta CFMX 7 Web Application Construction Kit. Good
book I just have one questions in the following code what does the n in the
#dateDiff('n', ARGUMENTS.appScope.appStarted, now())# minutes."> stand for
I can figure out what everything else stands for, but not the n. Any ideas
Here's the code for the entire file
<!--- Application.cfc --->
<cfcomponent output="false">
<cfset THIS.name = "ows23">
<cffunction name="onApplicationStart" returntype="boolean" output="false">
<!--- When did the application start --->
<cfset APPLICATION.appStarted = now()>
<cfreturn true>
</cffunction>
<cffunction name="onApplicationEnd" returntype="void" output="false">
<cfargument name="appScope" required="yes">
<!--- Log how many minsutes this application stayed alive --->
<cflog file="#THIS.name#"
text="App ended after #dateDiff('n', ARGUMENTS.appScope.appStarted, now())#
minutes.">
</cffunction>
<cffunction name="onRequestStart" returntype="boolean" output="true">
<cfset REQUEST.dataSource = "ows">
<cfset REQUEST.companyName = "Orange Whip Studios">
<!--- Display a site header at the top of every page --->
<cfinclude template="SiteHeader.cfm">
<cfreturn true>
</cffunction>
<cffunction name="onRequestEnd" returntype="void" output="true">
<!--- Display the site footer on every page --->
<cfinclude template="SiteFooter.cfm">
</cffunction>
</cfcomponent>
Pedro Claudio - 30 Dec 2005 21:36 GMT
Difference of the first date for second in minutes
http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000440.htm
yyyy: Years
q: Quarters
m: Months
y: Days of year (same as d)
d: Days
w: Weekdays (same as ww)
ww: Weeks
h: Hours
n: Minutes
s: Seconds
jhutchdublin - 30 Dec 2005 22:04 GMT
Thanks for that -- it clears a lot up.