RE: Reverse Engineer DayOfYear Function?

2002-09-04 Thread Raymond Camden
Simply create a date object for Jan 1 in the year you are testing. Then add to it the ordinal (minus 1 I think). This will give you a date object for the ordinal. === Raymond Camden, ColdFusion Jedi Master for Hire Email:

RE: Reverse Engineer DayOfYear Function?

2002-09-04 Thread Dan Haley
Standard answer will be: cfset myYear = 1999 cfset myDay = 182 cfset x = dateadd(d, myDay, createdate(myYear - 1, 12, 31)) Of course, those of us trying to liberate dates and allow them free access into the numeric arena like the much simpler: cfset myYear = 1999 cfset myDay = 182 cfset x =

RE: Reverse Engineer DayOfYear Function?

2002-09-04 Thread Bryan Love
cfscript theYear = year(now()); // or whatever... janEnd = 31; febEnd = janEnd + 28; if( isLeapYear(theYear) ) febEnd = febEnd + 1; marEnd = febEnd + 31; aprEnd = marEnd + 30; mayEnd = aprEnd + 31; junEnd = mayEnd + 30; julEnd = junEnd + 31; augEnd = julEnd + 31; sepEnd = augEnd + 30;

RE: Reverse Engineer DayOfYear Function?

2002-09-04 Thread Bryan Love
: RE: Reverse Engineer DayOfYear Function? Simply create a date object for Jan 1 in the year you are testing. Then add to it the ordinal (minus 1 I think). This will give you a date object for the ordinal. === Raymond Camden

Re: Reverse Engineer DayOfYear Function?

2002-09-04 Thread S . Isaac Dealey
Folks: I am trying to obtain a date from the ordinal produced by the function DayOfYear. In other words, does anyone know how to reverse engineer the ordinal into a usable date? I would assume I'd need to pass the ordinal and the year to some function to obtain a usable date. I can't

RE: Reverse Engineer DayOfYear Function?

2002-09-04 Thread S . Isaac Dealey
Simply create a date object for Jan 1 in the year you are testing. Then add to it the ordinal (minus 1 I think). This will give you a date object for the ordinal. Oh jeez... I think I need some sleep... I'm working on a pyramid scheme project ( not my idea ) that requires a horrendous nested

RE: Reverse Engineer DayOfYear Function?

2002-09-04 Thread Marlon Moyer
Do you work at Microsoft? :) -Original Message- From: Bryan Love [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 04, 2002 3:56 PM To: CF-Talk Subject: RE: Reverse Engineer DayOfYear Function? cfscript theYear = year(now()); // or whatever... janEnd = 31; febEnd = janEnd + 28