Application Kata "cal"

Write a program that displays a monthly calendar on the console.

The program is called with the month and year as command line parameters and then outputs a calendar:

C:>cal 2 2014
    February 2014
Sun Mon Tue Wed Thu Fri Sat
                   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

Note that in the example above, the week starts on Sunday instead of Monday, as is usual in Germany.

Variation #1

If the program is called without parameters, the calendar for the current month should be output.

Variation #2

The day of the week on which the week begins can be specified as an optional third parameter:

C:>cal 2 2014 Monday

The month and year can also be omitted:

C:>cal Monday
en_USEnglish