new Date(a.replace(/,/g,"\/|-"));

解决方案 »

  1.   

    只能先转换为标准时间再获取了。不过你可以转换成01 Jan 2002。把中间的-用javascript替换成空格去掉就可以了。
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    var time = "01-Jan-2002";
    time2 = time.replace("-"," ");
    h = new Date(time2);
    document.write(h.getFullYear(),"年");
    document.write("<BR>");
    document.write(h.getMonth()+1,"月");
    document.write("<BR>");
    document.write(h.getDate(),"日");
    document.write("<BR>");
    //-->
    </SCRIPT>