Month partition function