summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@cryptonomic.net>2022-09-17 10:26:46 -0400
committerAndrew Cady <d@cryptonomic.net>2022-09-17 10:26:55 -0400
commit3fb2c70d2f7e108dc8b83519c4220667bba13f46 (patch)
tree8c717bd43f648a06db54d9e66a07d30b062d8757
parentc40f8dca7610298b35bb1e4769297fcaa77d9ac5 (diff)
this fixes the math bug (for now... leap years still broken)
-rw-r--r--CosmicCalendar.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/CosmicCalendar.hs b/CosmicCalendar.hs
index 69d1d5d..50566d3 100644
--- a/CosmicCalendar.hs
+++ b/CosmicCalendar.hs
@@ -35,8 +35,16 @@ import qualified Rebase.Data.Map.Strict as Map
35ageOfUniverseInYears :: Integer 35ageOfUniverseInYears :: Integer
36ageOfUniverseInYears = 13787 * 1000 * 1000 36ageOfUniverseInYears = 13787 * 1000 * 1000
37 37
38-- The point of the cosmic calendar is to mentally visualize or model the scale
39-- of cosmic/geologic/evolutionary events using the existing internal mental
40-- model of the year. This internal mental model of the year is NOT a 365.2422
41-- day earth rotation, but a 365 day calendar year.
42--
43-- In order to make the math of the calendar work out, the functions that look
44-- up calendary entries (and take as input the LocalTime) must check for leap
45-- year, and subtract one day from the input if it is later than February.
38daysPerYear :: NominalDiffTime 46daysPerYear :: NominalDiffTime
39daysPerYear = 365.2422 47daysPerYear = 365 -- NOT 365.2422
40 48
41lengthOfDay :: NominalDiffTime 49lengthOfDay :: NominalDiffTime
42lengthOfDay = 24 * 60 * 60 50lengthOfDay = 24 * 60 * 60