I've created a calendar program once. basically, all you need to know is the current day, month, weekday and year and with those inputs, you can output the calendar month you want.