what if someone else wants the default behavior of adding only the month, no 
change in day? If the function worked the way you want it, I would have to 
program a kludge around getting the day to be the same. Why should it assume I 
want the last day of the month? I could understand if the function asked for a 
parameter to give me that, but I wouldn't want it to just assume for me. The 
average month is 30 days, so the default behavior it has right now to just give 
me a month increment with no change in the day seems smart to me. Why should it 
assume for me that if I increment the month, I want the last day of the month, 
the same weekday, or whatever? 




________________________________
From: Ras Tafari <[email protected]>
To: cf-talk <[email protected]>
Sent: Friday, April 3, 2009 8:51:12 AM
Subject: Re: would you consider this a bug, CF8


im just saying, that BEGIN and END of month are KNOWN things...
calculable things.
constants if you will.  why wouldnt a constant be available as a thing
i can know, the java
engine should know this... i realize i can code around it, hell i can
code around ANYTHING
but that does NOT mean its a good thing to code around.

right?

On Fri, Apr 3, 2009 at 6:29 AM, Azadi Saryev <[email protected]> wrote:
>
> dateAdd('m', i, date1)
> returns same DATE i months away. NOT same weekday, or same 3rd Thursday, or 
> even end of month date - just same DATE i months away.
>
>> so, with that, id say a new incrementer of precise calendar month would be 
>> best.
>
> why, when you can easily get the desired result using other already available 
> date functions?
>
> <cfset date1 = '11/30/2008' />
> <cfoutput>
>  <cfloop from=1 to=6 index=i>
>  <cfset newdate = dateAdd('m', i, date1) />
>  #dateFormat(createdate(year(newdate), month(newdate), 
> daysinmonth(newdate)),'mm/dd/yyyy')#<br />
>  </cfloop>
>  </cfoutput>
>
>
> Azadi Saryev
> Sabai-dee.com
> http://www.sabai-dee.com/
>
>
>
> Ras Tafari wrote:
>> but the end of months is a KNOWN thing, calculated out forever, look
>> at rainmain.
>> with that known constant of dates, it would be easy to code it such
>> that anything
>> end of month that asks for a incrementer of "m" would be easy to assume that.
>>
>> so, with that, id say a new incrementer of precise calendar month would be 
>> best.
>>
>> tw
>>
>>
>>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321280
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to