When is their birthday? Donald Knuth was born in 1938, on the 20th day of Capricorn.
The first day of Capricorn is the 22nd December.
Donald Knuth was born on the 10th of January (1938).



The challenge

Write a program or function which takes three inputs about a person (any other specified order is fine):


Their (calendar) year of birth (an integer)
Their sign of the zodiac (a string)
- may be whichever you choose from the following, so long as it is consistent: 


all lower case except the first character;
all lower case; or  
all upper case.

The (1-based) day of the zodiac period on which they were born (an integer)


...and provides two outputs (the other order is fine if specified):


The day of the month on which they were born (an integer)
Their month of birth (an integer)


More details

If your answer were a function, F, then for Donald Knuth we would run F(1938, 'Capricorn', 20) and receive the output (10, 1)

For the purposes of this challenge you do not need to shift the zodiac due to the shift between the Gregorian calendar and the tropical year, but you do need to account correctly for leap years.

February has 29 days rather than 28 on leap years.
A year is usually a leap year if it is divisible by 4 - the exceptions are when it is divisible by 100 but not 400 (so, 1600 and 2000 were, whereas 1700, 1800, and 1900 were not).

For reference the names of the signs of the zodiac and their inclusive ranges are:

Aries       21 March     – 20 April
Taurus      21 April     – 21 May
Gemini      22 May       – 21 June
Cancer      22 June      – 22 July
Leo         23 July      – 22 August
Virgo       23 August    – 23 September
Libra       24 September – 23 October
Scorpio     24 October   – 22 November
Sagittarius 23 November  – 21 December
Capricorn   22 December  – 20 January
Aquarius    21 January   – 19 February
Pisces      20 February  – 20 March


This is code-golf, so the shortest code in bytes is the aim.
No loopholes, yada yada; you know the drill.



Test cases

Charles Babbage   F(1791, 'Capricorn',  5) --&gt;  (26, 12)
George Boole      F(1815, 'Scorpio',   10) --&gt;  ( 2, 11)
Herman Hollerith  F(1860, 'Pisces',    10) --&gt;  (29,  2)
Vannevar Bush     F(1890, 'Pisces',    20) --&gt;  (11,  3)
Howard H. Aiken   F(1900, 'Pisces',    17) --&gt;  ( 8,  3)  - note 1900 was not a leap year
Donald Knuth      F(1938, 'Capricorn', 20) --&gt;  (10,  1)
&lt;Future Famed&gt;    F(2000, 'Pisces',    17) --&gt;  ( 7,  3)  - note 2000 was a leap year
Javascript (ES6), 121 120 119 bytes
(y,s,d)=&gt;[(d=new Date(y,m=s[2]=='s'?1:'r.sune0oapti'.search(s[4]||0),23+d-'343322110012'[m])).getDate(),d.getMonth()+1]

Format for the sign of the zodiac is either:

all lower case except the first character
all lower case

Test cases


let f =
(y,s,d)=&gt;[(d=new Date(y,m=s[2]=='s'?1:'r.sune0oapti'.search(s[4]||0),23+d-'343322110012'[m])).getDate(),d.getMonth()+1]

console.log(f(1791, 'Capricorn',  5)); // --&gt;  (26, 12)
console.log(f(1815, 'Scorpio',   10)); // --&gt;  ( 2, 11)
console.log(f(1860, 'Pisces',    10)); // --&gt;  (29,  2)
console.log(f(1890, 'Pisces',    20)); // --&gt;  (11,  3)
console.log(f(1900, 'Pisces',    17)); // --&gt;  ( 8,  3)
console.log(f(1938, 'Capricorn', 20)); // --&gt;  (10,  1)
console.log(f(2000, 'Pisces',    17)); // --&gt;  ( 7,  3)