| CallXML 2.0 Development Guide | Home | Frameset Home |
|
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<block>
</block>
</callxml>
<cfset TodaysDate = Now()>
Now() function. Now we will want to parse that variable and output some text to the caller via the callxml text-to-speech element.
<cfoutput>
<text>
</text>
</cfoutput>
<cfif #DatePart("h", TodaysDate)# less than 10>
oh
#Datepart("h", TodaysDate)#
hundred hours
and
#DatePart("n", TodaysDate)#
minutes.
<cfelse>
#DatePart("h", TodaysDate)#
hundred hours and
#DatePart("n", TodaysDate)#
minutes.
</cfif>
The date is
#DayofWeekAsString(DayOfWeek(TodaysDate))#,
#MonthAsString(Month(TodaysDate))#,
#Day(TodaysDate)#
#DatePart("yyyy", TodaysDate)#.
There are
#DaysInMonth(TodaysDate)#
days in this month.
We are in week
#Week(TodaysDate)#
of the year
#Year(TodaysDate)#
<cfset DaysLeft = #DaysinYear(TodaysDate)# -
#DayofYear(TodaysDate)#>
There are
#DaysLeft#
days left in this year.
</block>
</callxml>
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<block>
<cfset TodaysDate = Now()>
<cfoutput>
<text>
<cfif #DatePart("h", TodaysDate)# less than 10>
oh #Datepart("h", TodaysDate)# hundred hours and
#DatePart("n", TodaysDate)# minutes.
<cfelse>
#DatePart("h", TodaysDate)# hundred hours and
#DatePart("n", TodaysDate)# minutes.
</cfif>
The date is #DayofWeekAsString(DayOfWeek(TodaysDate))#,
#MonthAsString(Month(TodaysDate))#, #Day(TodaysDate)#
#DatePart("yyyy", TodaysDate)#.
There are #DaysInMonth(TodaysDate)# days in this month.
We are in week #Week(TodaysDate)# of the year
#Year(TodaysDate)#.
<cfset DaysLeft = #DaysinYear(TodaysDate)# -
#DayofYear(TodaysDate)#>
There are #DaysLeft# days left in this year.
</text>
</cfoutput>
</block>
</callxml>
| ANNOTATIONS: EXISTING POSTS |
| login |
|