Output: Calendar Month (without native calendar generating functions)
Ruby, 170 168 characters
g=gets.to_i
require'date'
d=Date.new g/100,g%100
puts'Mo Tu We Th Fr Sa Su'
l=['']*(d.jd%7)+[*1..(d&gt;&gt;1).jd-d.jd]
56.times{|i|$&gt;&lt;&lt;&quot;#{l[i].to_s.rjust 2} #{?\n if i%7&gt;5}&quot;}

Bugfix: didn't require the neccessary library (+16)
used julian date modulo 7 instead of current week day directly (-3)
used /100 and %100 to parse date instead of regex (-13). Taken from LegoStormtroopr's answer.
removed the parentheses around the argument to rjust and Date.new(-2)