AMEN!!

(not terribly helpful, but feels good to say)

- Kelly

--- In [email protected], "Pan Troglodytes"
<[EMAIL PROTECTED]> wrote:
>
> I swear, I really think the date class was designed by a crazy man.  You
> hear that Adobe? - CRAZY! :D
> 
> On 6/23/06, Daniel Tuppeny <[EMAIL PROTECTED]> wrote:
> >
> >    I was using .day instead of .date
> >
> > TFI Friday! =)
> >
> >  ------------------------------
> > *From:* [email protected]
[mailto:[EMAIL PROTECTED] *On
> > Behalf Of *Daniel Tuppeny
> > *Sent:* 23 June 2006 15:33
> > *To:* [email protected]
> > *Subject:* RE: [flexcoders] Difference between two dates
> >
> >  I think I need more coffee....
> >
> > The following code (which I'm sure is correct!), returns around
2.8 when
> > I'm expecting around 3.2. Anyone spot my error?
> >
> >
> >
> > public static function getMonths(startDate:Date, endDate:Date):Number
> >   {
> >    if (startDate > endDate)
> >    {
> >     var tmp:Date = endDate;
> >     endDate = startDate;
> >     startDate = tmp;
> >    }
> >
> >    var numMonths:Number = 0;
> >
> >    // Get number of months in years
> >    numMonths += (endDate.fullYear - startDate.fullYear) * 12
> >    numMonths += endDate.month - startDate.month;
> >    numMonths += (endDate.day - startDate.day) / 30; // This needs
fixing
> >
> >    return numMonths;
> >   }
> >
> > ______________________________________________________________________
> > This email has been scanned by the MessageLabs Email Security System.
> > For more information please visit http://www.messagelabs.com/email
> > ______________________________________________________________________
> >
> > [Inbound Mail Scanned by MessageLabs]
> >
> >
> > ______________________________________________________________________
> > This email has been scanned by the MessageLabs Email Security System.
> > For more information please visit http://www.messagelabs.com/email
> > ______________________________________________________________________
> >
> >  
> >
> 
> 
> 
> -- 
> Jason
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to