|
The primary function centers around the following: <!--- Functions to
determine end time --->
<cfset x=CreateTimeSpan(0, 0, RequestTimeStart, 0)>
<cfset y=CreateTimeSpan(0, 0, RequestTimeAmount, 0)>
<cfset z=x+y>
Within the parenthesis of the
CreateTimeSpan, the variables (gathered from the above form set as
minutes) are placed in the "minutes" spot. "x" is the start time
in minutes. "y" is the time span in minutes. Adding these
together give a total minutes for end time.
Note: if the end time is past 12:00 am then it is obviously the next
day, but the function still works fine. Additional code is
required to calculate whether the end time is in the next day or not if
required.
To get the values in an HH:MM format,
TimeFormat
is used accordingly. |