This is a play on words. The phrase "getting twelve months" refers to the thief getting a twelve month prison sentence for his crime. However, "getting twelve months" also refers to the thief stealing the calendar, since a calendar contains pages for each of the twelve months of the year.
A thief who stole a calendar got twelve months .