@@ -2,15 +2,15 @@ function computus(year; servois=false)
22
33# Year's position on the 19 year metonic cycle
44 a = mod (year, 19 )
5-
5+
66# Century index
7- k = floor (Int, year / 100 )
7+ k = fld (year, 100 )
88
99# Shift of metonic cycle, add a day offset every 300 years
10- p = floor (Int, ( 13 + 8 * k) / 25 )
10+ p = fld ( 13 + 8 * k, 25 )
1111
1212# Correction for non-observed leap days
13- q = floor (Int, k / 4 )
13+ q = fld (k, 4 )
1414
1515# Correction to starting point of calculation each century
1616 M = mod (15 - p + k - q, 30 )
@@ -20,7 +20,7 @@ function computus(year; servois=false)
2020
2121# Returning if user wants value for Servois' table
2222if servois
23- return mod (21 + d,31 )
23+ return mod (21 + d,31 )
2424end
2525
2626# Finding the next Sunday
@@ -40,24 +40,23 @@ function computus(year; servois=false)
4040end
4141
4242# Determination of the correct month for Easter
43- if (22 + d + e > 31 )
44- return " April " * string (d + e - 9 )
43+ if (22 + d + e > 31 )
44+ return " April " * string (d + e - 9 )
4545else
46- return " March " * string (22 + d + e)
46+ return " March " * string (22 + d + e)
4747end
4848end
4949
5050# Here, we will output the date of the Paschal full moon
5151# (using Servois notation), and Easter for 2020-2030
5252
53- a = [i for i = 2020 : 2030 ]
54- servois_numbers = computus .(a;servois= true )
53+ a = collect ( 2020 : 2030 )
54+ servois_numbers = computus .(a; servois= true )
5555easter_dates = computus .(a)
5656
57- println (" The following are the dates of the Paschal full moon (using Servois " *
57+ println (" The following are the dates of the Paschal full moon (using Servois " *
5858" notation) and the date of Easter for 2020-2030 AD:" )
59- println (" Year Servois number Easter " )
59+ println (" Year\t Servois number\t Easter " )
6060for i = 1 : length (a)
61- println (string (a[i])* " \t " * string (servois_numbers[i])* " \t\t " *
62- string (easter_dates[i]))
61+ println (" $(a[i]) \t $(servois_numbers[i]) \t\t\t\t $(easter_dates[i]) " )
6362end
0 commit comments