To show all possible days, we would need at least ten digits ( 0 - 9 ) plus an extra 1 and 2 for the 11th and the 22nd. This gives us 12 digits and we have twelve faces on our cube.
To arrange them let's start by putting the zero on cube A. That means that cube B has to have the digits 1-9 on it. That's impossible and we don't have enough faces to put the zero on both cubes.
The trick here is to use the 6 and the 9 interchangeable (by flipping the nine upside down we get a six). Now we've freed a face up and we can put 0, 1 and 2 on both cubes. We put 3, 4, 5 on cube A and 6, 7, 8 on cube B. Since both cubes have 0, 1 and 2 on them we can represent 01 to 29. 30 and 31 will also display properly.