cal by nn

for(;[m,y]=readline().split(i=j=S=' '),m;print(i<36?o+n:o)){d=new Date(y,--m,1)
for(o=d.toLocaleFormat('%B ')+y;!o[19];)o=o[-1]&1?o+S:S+o
for(o+='\nSu Mo Tu We Th Fr Sa';i<d.getDay()||j++<31-'020101001010'[m];o+=/..$/(S+j))o+=i++%7?S:n='\n'}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page