Calendar - for "REAL" programmers: Difference between revisions
Content added Content deleted
(Fixing DaysInMonth function for February, try former function with 1968 or 2000 to see why this is necessary.) |
|||
Line 625: | Line 625: | ||
DEF FNDIM(M%,Y%) |
DEF FNDIM(M%,Y%) |
||
CASE M% OF |
CASE M% OF |
||
WHEN 2: = 28 |
WHEN 2: = 28 + (Y%MOD4=0) - (Y%MOD100=0) + (Y%MOD400=0) |
||
WHEN 4,6,9,11: = 30 |
WHEN 4,6,9,11: = 30 |
||
OTHERWISE = 31 |
OTHERWISE = 31 |
||
Line 651: | Line 651: | ||
27 28 29 30 31 24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31 |
27 28 29 30 31 24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31 |
||
31 30</pre> |
31 30</pre> |
||
=={{header|C}}== |
=={{header|C}}== |