javascript 获取星座

function getAstro(m,d){
    var res = ["\u9b54\u7faf","\u6c34\u74f6","\u53cc\u9c7c","\u7261\u7f8a","\u91d1\u725b","\u53cc\u5b50",
        "\u5de8\u87f9","\u72ee\u5b50","\u5904\u5973","\u5929\u79e4","\u5929\u874e","\u5c04\u624b","\u9b54\u7faf"];
    //0~12的数字,0表示摩羯,1表示水瓶,依此类推,...,11是射手,12是摩羯。
    return res[m-(d<"102223444433".charAt(m-1)- -19)] +"\u5ea7";   
}

function demo(){
    var da = new Date();
    return getAstro(da.getMonth()+1, da.getDate());
}