On 8/28/07, grum <[EMAIL PROTECTED]> wrote:
>
> Hi everyone,
>
> I'm having problems comparing the following:
>
> isoTimestamp("2007-08-13T04:00:00+00:00")
>
> which gives me:
>
> Mon Aug 13 2007 00:00:00 GMT-0400 (EDT)
>
> and:
>
> Date()
>
> which (right now) gives me:
>
> "Tue Aug 28 2007 16:14:12 GMT-0400 (EDT)"
>
> ie. isoTimestamp("2007-08-13T04:00:00+00:00") < Date() is returning
> false.
>
> I think it's something to do with the lack of quotes around the result
> of isoTimestamp - though quite what that means i'm not sure. Please
> someone help me out, i really need to be able to compare these dates.
JavaScript's built-in comparison operators are no good for comparing
objects, only strings and numbers. This is why MochiKit.Base.compare
exists.
-bob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---