Edit in JSFiddle

function getStarSign(d){
    
    //borderValue: month * 100 + day とした場合の境界値
    var starSigns = [
        { id: 1, name: 'やぎ座', borderValue: 119 },
        { id: 2, name: 'みずがめ座', borderValue: 218 },
        { id: 3, name: 'うお座', borderValue: 320 },
        { id: 4, name: 'おひつじ座', borderValue: 419 },
        { id: 5, name: 'おうし座', borderValue: 520 },
        { id: 6, name: 'ふたご座', borderValue: 621 },
        { id: 7, name: 'かに座', borderValue: 722 },
        { id: 8, name: 'しし座', borderValue: 822 },
        { id: 9, name: 'おとめ座', borderValue: 922 },
        { id: 10, name: 'てんびん座', borderValue: 1023 },
        { id: 11, name: 'さそり座', borderValue: 1122 },
        { id: 12, name: 'いて座', borderValue: 1221 }
    ];

    var month = d.getMonth() + 1;
    var day = d.getDate();
    var targetValue = month * 100 + day;
    var idx = 0;
    for(idx = 0; idx < starSigns.length; idx++){
        if( targetValue <= starSigns[idx].borderValue ){
            break;
        }
    }
    var starSign = 0;
    if(idx === 12){
        idx = 0;
    }
    starSign = starSigns[idx];
    return { id: starSign.id, name: starSign.name };    
}

mocha.setup('bdd');

describe("A suite", function() {
    it('check border values', function(){
        expect( getStarSign(new Date(2013, 1-1, 1, 0, 0, 0)).id ).to.be(1);        // 1/1 -> 1:やぎ座
        expect( getStarSign(new Date(2013, 1-1, 19, 23, 59, 59)).id ).to.be(1);    // 1/19 -> 1:やぎ座
        expect( getStarSign(new Date(2013, 1-1, 20, 0, 0, 0)).id ).to.be(2);          // 1/20 -> 2:みずがめ座
        expect( getStarSign(new Date(2013, 12-1, 21, 23, 59, 59)).id ).to.be(12);        // 12/21 -> 12:いて座
        expect( getStarSign(new Date(2013, 12-1, 22, 0, 0, 0)).id ).to.be(1);        // 12/22 -> 1:やぎ座
    });
    it('check name', function(){
        expect( getStarSign(new Date(2013, 1-1, 1, 0, 0, 0)).name ).to.be('やぎ座');        // 1/1 -> 1:やぎ座
        expect( getStarSign(new Date(2013, 1-1, 20, 0, 0, 0)).name ).to.be('みずがめ座');   // 1/20 -> 2:みずがめ座
    });
});

mocha.run();

<div id="mocha"></div>

              

External resources loaded into this fiddle: