You're formatting B1, the cell that contains the formula =DAY(A1). It says Sunday because January 15, 1900 was a Sunday (at least according to Excel, see below). Try formatting both A1 and B1 with various date formats and you will see what I mean.
In other words, =DAY(A1) produces the number 15, which when interpreted by Excel as a date yields January 15, 1900.
Interestingly, January 15, 1900 was really a Monday, too. But Excel reproduced the Lotus 1-2-3 bug which erroneously treated 1900 as a leap year (probably for compatibility). Consequently dates prior to March 1, 1900 are off by one in Excel.
Historical note: When I wrote a spool file to .csv application for an IBM AS/400 several years ago, I had to reproduce the same bug for the same reason (compatiblity).