Ever notice that on monthly calendars, all of the Sundays, Mondays, Tuesdays, etc. have numbers that are 7 integers apart? That's because there are 7 days in a week! If today is the 1st day of the month & a Wednesday, then the next Wednesday will be the 8th day of the month! In fact, you can check the linear functions for each month column in the images below:
Note: The top row is numbered zero(0) because it simplifies the math considering the 1st day of the month. Also, did you notice that I put the plus-or-minus symbol (±) in the formula at the top of the Web page? That's because negative numbers are very important in this formula! A column of a monthly calendar can be numbered with a negative number, like you can see in 2 of these 3 calendars! Adding negative numbers turns addition into subtraction!
The variable b in the formula is always equal to zero(0) on the column that comes before the 1st day of the month. If the 1st day of a month is a Sunday, then this variable (b) will always be a positive number! The maximum possible number that b can be +7 & the minimum is -5.
Conclusively, since the months of the year have at most 31 days, the variable y will always leave a blank day space if it's equal to 32 or more! It also leaves blank day spaces where it's less than 1. I decided to only use monthly calendars with exactly 31 days to keep things simple; however, if the month is February, then the variable y will leave blank day spaces when it's greater than 28. (Or 29 during leap years!) If the month is April, June, September or November, then the variable y will leave blank day spaces when it's greater than 30.
Back to Index Page Back to Math Trick Menu
© Derek Cumberbatch