GithubHelp home page GithubHelp logo

kolodny / conway-hebrew-calendar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bendory/conway-hebrew-calendar

0.0 1.0 0.0 302 KB

An implementation of Professor John H. Conway's Hebrew Calendar algorithm

License: Apache License 2.0

Go 100.00%

conway-hebrew-calendar's Introduction

conway-hebrew-calendar

An implementation of Professor John H. Conway's Hebrew Calendar algorithm.

I've tested this implementation for accuracy using dates from 1 CE - 3000 CE by comparing to the Hebrew calendar behind http://www.hebcal.com/. Note that:

  • Results prior to the adoption of the Gregorian calendar (~1752, depending on location) use the proleptic Gregorian calendar. This implementation is in Golang, and my understanding of Go's time.Time is that it similarly uses a proleptic Gregorian calendar.
  • Some time between 70 and 1178 CE, the observation-based Hebrew calendar was replaced by the calculated calendar developed by Hillel HaNasi. So this implementation projects a proleptic calculated Hillel Hebrew calendar (a term that I just made up) onto a proleptic Gregorian calendar.

Background

Professor Conway was able to convert between Hebrew and Gregorian calendar dates by way of mental math in seconds. After his death, I learned that a paper explaining his algorthim had been published in the January 2014 edition of The College Mathematics Journal. (For archival purposes, I've copied the PDF here.)

This repo implements Conway's Hebrew Calendar algorithm in Go.

Ambiguities

Along the implementation path, I found a few notable items that are not explained in the paper.

  1. On p. 3, when calculating the date of Rosh Hashannah, truncate, don't round. This seems to contradict the paper which states that Sept 29.5 --> Sept 30, but author David Slusky told me to truncate and empirical evidence is that truncating works.
  2. On p. 3, when calculating SHE, use 4 in the tens digit if the outgoing year was a leap year.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.