Functions for working with the idealized calendar of Planet Xhilr
Revisión | 26ee06c4d3056f43e971d6f5b3587a9ddca06e34 (tree) |
---|---|
Tiempo | 2017-06-13 17:09:44 |
Autor | Joel Matthew Rees <joel.rees@gmai...> |
Commiter | Joel Matthew Rees |
working version
@@ -25,10 +25,10 @@ | ||
25 | 25 | define showmonths( years ) { |
26 | 26 | sum = 0; |
27 | 27 | for ( year = 0; year < years; ++year ) { |
28 | - for ( month = 1; month <= 12; ++month ) { | |
28 | + for ( month = 0; month < 12; ++month ) { | |
29 | 29 | days = 29; |
30 | 30 | sum += days; |
31 | - product = year * ( 241957 / 686 ) + month * ( 241957 / 686 ) / 12; | |
31 | + product = year * ( 241957 / 686 ) + ( month + 1 ) * ( 241957 / 686 ) / 12; | |
32 | 32 | if ( ( product - sum ) >= 0 ) { |
33 | 33 | days += 1; sum += 1; |
34 | 34 | } |