G Guest Apr 7, 2006 #1 e.g 4/30/2005 e.g 6/30/2007 how to compare the two string in javascript which one is bigger
F Flinky Wisty Pomm Apr 7, 2006 #3 This really should be posted to a javascript group, comp.lang.javascript is always useful but function maxDate(d1,d2) { return Date.parse(d1) > Date.parse(d2) ? d1 : d2; } You can also use Math.max(Date.parse(...)...) but that'll return you the larger date as the number of milliseconds since... jan 1/1970? I think.
This really should be posted to a javascript group, comp.lang.javascript is always useful but function maxDate(d1,d2) { return Date.parse(d1) > Date.parse(d2) ? d1 : d2; } You can also use Math.max(Date.parse(...)...) but that'll return you the larger date as the number of milliseconds since... jan 1/1970? I think.