Saturday 20 September 2014

Alignment of Number of Days in a Month

Alignments

Alignment of Number of Days in a Month:

All know that
  1. Certain months have 31 days, 
  2. and some have 30 days. 
  3. Feb has 28 in Non Leap Years
  4. and 29 in Leap Years.
# of Days Months
Common
31
1 (Jan) 3 (Mar 5 (May 7 (Jul) 8 (Aug) 10 (Oct) 12 (Dec)
30
4 (Apr) 6 (Jun) 9 (Sep) 11 (Nov)
Leap Year
29
2 (Feb)
Non Leap Year
28

There is a small trick to differentiate between those that have 31 and those that have lesser.
On our knuckles, the month that falls on high is 31 days, while those that fall on low are 30 days or lesser. We have to count to Jul and start again the first which makes Jul and Aug both 31 days.
Isn't it simple?

Friday 19 September 2014

Alignment of First Day/Weeks in a Month

Alignments

Alignment of First Day/Weeks in a Month:

Like "Alignment of Number of Days in a Month" certain months align. In the following table, 
  1. Common Alignment is for the all years
  2. Leap Alignment 
    • can combine (like 1,4,7) 
    • or can be unique (like (2,8)
  3. Non Leap Alignment
    • can combine (like 2,3,11) 
    • or can be unique (like (1,10)
  4. Some Months Standout in All Years (like 5 and 6).
Non Leap Alignment Leap Alignment Common Alignment
1 4, 7
1, 10
2 3, 11
2,8
9, 12

Alignment of WeekDays and Months in a Year

Alignments

Alignment of WeekDays and Months in a Year:

Like "Alignment of Number of Days in a Month" and "First Day/Weeks in a Month"
we can align Years based on the above.

Months Years
Range -> 1973-1999 2001-2027 2029-2055
1, 10 5 8 2, 3, 11 6 9, 12 4, 7 1978 1989 1995 2006 2017 2023 2034 2045 2051
4, 7 1, 10 5 8 2, 3, 11 6 9, 12 1973 1979 1990 2001 2007 2018 2029 2035 2046
9, 12 4, 7 1, 10 5 8 2, 3, 11 6 1974 1985 1991 2002 2013 2019 2030 2041 2047
6 9, 12 4, 7 1, 10 5 8 2, 3, 11 1975 1986 1997 2003 2014 2025 2031 2042 2053
2, 3, 11 6 9, 12 4, 7 1, 10 5 8 1981 1987 1998 2009 2015 2026 2037 2043 2054
8 2, 3, 11 6 9, 12 4, 7 1, 10 5 1982 1993 1999 2010 2021 2027 2038 2049 2055
5 8 2, 3, 11 6 9, 12 4, 7 1, 10 1977 1983 1994 2005 2011 2022 2033 2039 2050
Sun Mon Tue Wed Thu Fri Sat <- Weekday
1, 4, 7 10 5 2, 8 3, 11 6 9, 12 1984 2012 2040
9, 12 1, 4, 7 10 5 2, 8 3, 11 6 1996 2024 2052
6 9, 12 1, 4, 7 10 5 2, 8 3, 11 1980 2008 2036
3, 11 6 9, 12 1, 4, 7 10 5 2, 8 1992 2020 2048
2, 8 3, 11 6 9, 12 1, 4, 7 10 5 1976 2004 2032
5 2, 8 3, 11 6 9, 12 1, 4, 7 10 1988 2016 2044
10 5 2, 8 3, 11 6 9, 12 1, 4, 7 1972 2000 2028
Range -> 72-96 00-24 28-52
Months Leap Years
1 Sun
2 1 Mon
3 2 1 Tue
4 3 2 1 Wed
5 4 3 2 1 Thu
6 5 4 3 2 1 Fri
7 6 5 4 3 2 1 Sat
8 7 6 5 4 3 2 Sun
9 8 7 6 5 4 3 Mon
10 9 8 7 6 5 4 Tue
11 10 9 8 7 6 5 Wed
12 11 10 9 8 7 6 Thu
13 12 11 10 9 8 7 Fri
14 13 12 11 10 9 8 Sat
15 14 13 12 11 10 9 Sun
16 15 14 13 12 11 10 Mon
17 16 15 14 13 12 11 Tue
18 17 16 15 14 13 12 Wed
19 18 17 16 15 14 13 Thu
20 19 18 17 16 15 14 Fri
21 20 19 18 17 16 15 Sat
22 21 20 19 18 17 16 Sun
23 22 21 20 19 18 17 Mon
24 23 22 21 20 19 18 Tue
25 24 23 22 21 20 19 Wed
26 25 24 23 22 21 20 Thu
27 26 25 24 23 22 21 Fri
28 27 26 25 24 23 22 Sat
29 28 27 26 25 24 23 Sun
30 29 28 27 26 25 24 Mon
31 30 29 28 27 26 25 Tue
31 30 29 28 27 26 Wed
31 30 29 28 27 Thu
31 30 29 28 Fri
31 30 29 Sat
31 30 Sun
31 Mon

In the above table, the numbers below the Months Column show which Month of which year have which day as the first day of that month.
For Eg.,
  1. For Non Leap Years
    • For Years 78, 89, 95, etc, Months Jan and Oct have Monday as the First Day of the month.
    • For Years 73, 79, 90, etc, Months Jan and Oct have Tuesday as the First Day of the month.
  2. For Leap Years
    • For years 1984, 2012, 2040, Months Jan, Apr and Jul have Monday as the First Day of the month.
    • For years 1996, 2024, 2052, Months Jan, Apr and Jul have Tuesday as the First Day of the month.
One can observe that the combination of Month Slides to the left every next line.
Non Leap Years tend to have a similar Month Week Combination every 6th, 11th or 17th years, but for sure on every 28th year.
Leap Years have same calendar every 28th year.

Based on this, any one can calculate for more years not mentioned in the above table, by simply deducting or adding 28 from the Year they want and to match it in the Years in the table.