Xmas is on the 25th?
Damn I've been jewish for too long.
Xmas is on the 25th?
Damn I've been jewish for too long.
[quote user="pauluskc"][quote user="Marak"]
So help me god, DONT MAKE FUN OF COLDFUSION.
Why would they use sql to get the date.....its an easy as.
<cfset xmas = CreateDate(2006,12,23)>
<cfset daystillxmas = DateDiff("d",xmas,Now();)>
<cfoutput>#daystillxmas#</cfoutput>
Seriously, anyone who disses on Coldfusion has either:
1. Never used it.
2. Never used it properly
[/quote]
Perhaps I'm missing something here in the "most perfect web programming language." But I have to say, you summed up the universe with your first line of code (see bolded). Maybe CF starts it's arrays at -1 instead of 0 or 1 like most other languages? Perhaps it just numbs the brain with all the radiation that leaks from the process (cold fusion). Gotta love this quote from Wiki on the subject of cold fusion:
"We couldn't achieve what was first claimed in terms of cold fusion."
Kinda sums up the world of Cold Fusion (the web language).
[/quote]
<cfset xmas = CreateDate(2006,12,23)>
What is <font style="background-color: #ffff00">soo</font> bad about that line? It creates a datetime object with 2006 as the year part, 12 as the month part, and 23 as the day part. <font style="background-color: #ffff00">Coldfusion</font> variables are dynamically-typed. <font style="background-color: #ffff00">CreateDate</font> returns a <font style="background-color: #ffff00">datetime</font> and automatically assigns <font style="background-color: #ffff00">xmas</font> to type <font style="background-color: #ffff00">datetime</font>. This means that <font style="background-color: #ffff00">xmas</font> now inherits all the functions that relate to <font style="background-color: #ffff00">coldfusion</font> <font style="background-color: #ffff00">datetime</font> objects. <font style="background-color: #ffff00">DateDiff</font>, <font style="background-color: #ffff00">DateAdd</font>, <font style="background-color: #ffff00">IsDate</font>, <font style="background-color: #ffff00">DateCompare</font>, etc.. , etc.. I've never had ANY problems with <font style="background-color: #ffff00">CF's</font> variables (performance or programming).
Here's another gem. Lets say I have this conditional:
<cfif X>Do something<cfelse>do something else</cfif>
This statement will work 100% if X is any of the following values.
<cfset x = true> OR <cfset x = "true"> OR <cfset x = "1"> OR <cfset x = 1>
This isn't assembly code for embedded applications, it's rapid application development and you should try it sometime.
This is yet another classic never have used <font style="background-color: #ffff00">coldfusion</font> and hate it attitude.
So help me god, DONT MAKE FUN OF COLDFUSION.
Why would they use sql to get the date.....its an easy as.
<cfset xmas = CreateDate(2006,12,23)>
<cfset daystillxmas = DateDiff("d",xmas,Now();)>
<cfoutput>#daystillxmas#</cfoutput>
Seriously, anyone who disses on Coldfusion has either:
1. Never used it.
2. Never used it properly