ColdFusion Convert Number to Day
Author: Junaidi Musa
JUNAIDIX™ Laboratories

File: notoday.cfm

Day is represent in number 1(Sunday) to 7 (Monday)

<cfscript>
function getday(n)
{
if(n eq 1)
return "Sunday";
if(n eq 2)
return "Monday";
if(n eq 3)
return "Tuesday";
if(n eq 4)
return "Wednesday";
if(n eq 5)
return "Thursday";
if(n eq 6)
return "Friday";
if(n eq 7)
return "Saturday";
}
< /cfscript>

Usage:
1. Create notoday.cfm
2. Copy and Paste Above Code
3. Include the file using <cfinclude> tag
4. Use it as regular function.

eg:
<cfoutput>
The day is : #getday(1)#
</cfoutput>

output:
The day is : Sunday

Copyright © 2004 JUNAIDIX™ Laboratories

Hosted by www.Geocities.ws

1