> things like date.date += 12
 
I didn't know that. That's certainly a bit better! I was frustrated there was no AddDays() etc.!
 
 
> Yes, yes, I know you can do the getTime() arithmetic
 
You can't. Because once you detach the length of time from the actual dates, you can't figure out the number of months accurately (because of the difference in days). I originally did GetTime of both dates, and then created a date from the difference (and took away 1970 years), but the length was then out by a number of days! :-(
 
 
> If I were redesigning it, it wold at least ook like this:

I agree - it was the day/date that had me spending an hour to do simple maths!
 
 
>year - why fullYear?
 
This got me too... .year appears in the intellisense, but when I used it, I got an error - WTF?!
It wouldn't be so bad if they'd actually added a 2-figure year, but they dumped .year, and added fullYear. Grrr!


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Pan Troglodytes
Sent: 23 June 2006 16:53
To: [email protected]
Subject: Re: [flexcoders] Difference between two dates

Well, it helped when I figured out I could do things like date.date += 12 and it would automatically correct for rolling over months/years.  But at the very least, there needs to be a built-in daysBetween function.  Yes, yes, I know you can do the getTime() arithmetic.  But every time you have to fall back to that, it feels kludgy.

If I were redesigning it, it wold at least ook like this:

dayOfWeek - what used to be called day
day - day in month (used to be called date)
month - 1 based like day (what used to be called date) is
hour/minute/second/millisecond - singular (if hour is plural, why not "months"?)
year - why fullYear?  I mean, c'mon, do people really expect something called "year" to be two digits or what?
daysBetween(laterDate:date) - laterDate minus this in days

But, alas, it's too late.  There's no way they'll make the change at this late day.

I mean "date".

Haha.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
__._,_.___

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





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to