APL(NARS), 190183 chars
L←{(0=400∣⍵)∨(0≠25∣⍵)∧0=4∣⍵}⋄C←{Y←(30+2741⊤⍨12/2)+(¯2+L⍵[2])×2=⍳12⋄d←7∣+/Y[⍳⍵[1]-1],{1+L⍵}1900..⍵[2]-1⋄(11⋄7 7⍴(,/7 2⍴'MoTuWeThFrSaSu'),[1]6 7⍴(d⍴⊂''),{2 0⍕⍵}¨(⍳Y[⍵[1]]),12⍴⊂''}∘{(100∣⍵),⌊⍵÷100}
Input ok only from 1900. Test & how to use it:
C 201312
Mo Tu We Th Fr Sa Su
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
C 202312
Mo Tu We Th Fr Sa Su
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31