JS function of acquiring Constellation

Constellation acquired by JS function

function getConstellation(m,d){ 
        var s="魔羯水瓶双鱼牡羊金牛双子巨蟹狮子处女天秤天蝎射手魔羯";
        var arr=[20,19,21,21,21,22,23,23,23,23,22,22];
        return s.substr(m*2-(d<arr[m-1]?2:0),2);
    }


Reproduced in: https: //my.oschina.net/zhouz/blog/213124

Guess you like

Origin blog.csdn.net/weixin_34208185/article/details/91728408