compare two dates with javascript

Hello All

I havetwo date's in diffrent formate.

Formate of 1st date is : dd/MMM/yyyy (i.e 01/Jul2007)

Formate of 2nd date is : dd/mm/yyyy (i.e 01/06/2007)

now how i would compare these two dates with javascript.and get the result say

0=equal

1=greater

-1=smaller

thanx in advance

[343 byte] By [Anand_Shekhar_SEa] at [2007-11-27 8:17:16]
# 1

> now how i would compare these two dates with javascript

This isn't a JavaScript forum.

If you're talking about Java, then you have two String date representations. To compare them as dates, parse them to Date objects and then use the Date.compareTo() method.

~

yawmarka at 2007-7-12 20:02:25 > top of Java-index,Java Essentials,Java Programming...
# 2
thanx buddy .. but i have to compare it with javascript
Anand_Shekhar_SEa at 2007-7-12 20:02:25 > top of Java-index,Java Essentials,Java Programming...
# 3
> thanx buddy .. but i have to compare it with javascriptWrong forum. Try DevShed. http://forums.devshed.com/javascript-development-115/~
yawmarka at 2007-7-12 20:02:25 > top of Java-index,Java Essentials,Java Programming...