Commit 2eca963c authored by josd's avatar josd

modalities producing Turtle or N3

parent a27f2e31
from datetime import date
def calc_easter(year):
def easter(year):
"Returns Easter as a date object."
"see http://code.activestate.com/recipes/576517-calculate-easter-western-given-a-year/"
a = year % 19
......@@ -16,8 +16,8 @@ def calc_easter(year):
print('PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>')
print('PREFIX : <http://josd.github.io/eye/modalities#>')
print('')
print('2019 :easter "%s"^^xsd:date.' % (calc_easter(2019)))
print('2020 :easter "%s"^^xsd:date.' % (calc_easter(2020)))
print('2021 :easter "%s"^^xsd:date.' % (calc_easter(2021)))
print('2022 :easter "%s"^^xsd:date.' % (calc_easter(2022)))
print('2023 :easter "%s"^^xsd:date.' % (calc_easter(2023)))
print('2019 :easter "%s"^^xsd:date.' % (easter(2019)))
print('2020 :easter "%s"^^xsd:date.' % (easter(2020)))
print('2021 :easter "%s"^^xsd:date.' % (easter(2021)))
print('2022 :easter "%s"^^xsd:date.' % (easter(2022)))
print('2023 :easter "%s"^^xsd:date.' % (easter(2023)))
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://josd.github.io/eye/modality#>
PREFIX : <http://josd.github.io/eye/modalities#>
2019 :easter "2019-04-21"^^xsd:date.
2020 :easter "2020-04-12"^^xsd:date.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment