{"id":13507730,"url":"https://github.com/rengel-de/calixir","last_synced_at":"2025-03-17T12:31:02.353Z","repository":{"id":57481921,"uuid":"280612863","full_name":"rengel-de/calixir","owner":"rengel-de","description":"Calixir is a port of the Lisp calendar software calendrica-4.0 to Elixir.","archived":false,"fork":false,"pushed_at":"2020-10-26T15:51:08.000Z","size":158,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T23:59:02.173Z","etag":null,"topics":["calendar","converters","elixir","lisp"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rengel-de.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-18T08:15:04.000Z","updated_at":"2024-08-11T10:02:06.000Z","dependencies_parsed_at":"2022-09-02T06:10:29.437Z","dependency_job_id":null,"html_url":"https://github.com/rengel-de/calixir","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rengel-de%2Fcalixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rengel-de%2Fcalixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rengel-de%2Fcalixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rengel-de%2Fcalixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rengel-de","download_url":"https://codeload.github.com/rengel-de/calixir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243864609,"owners_count":20360355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calendar","converters","elixir","lisp"],"created_at":"2024-08-01T02:00:38.323Z","updated_at":"2025-03-17T12:31:01.914Z","avatar_url":"https://github.com/rengel-de.png","language":"Elixir","funding_links":[],"categories":["Date and Time"],"sub_categories":[],"readme":"# Calixir\n\n## About\n  \n`Calixir` is a port of the Lisp calendar software `calendrica-4.0.cl` \nof the 4th edition of the book\n\n\n[Calendrical Calculations - The Ultimate Edition](https://www.cs.tau.ac.il/~nachum/calendar-book/fourth-edition/)  \nby Edward M. Reingold and Nachum Dershowitz  \nCambridge University Press, 2018\n\n\nto Elixir. In the software, this book is referenced as **DR4**.\nEverybody interested in `Calixir` probably should get a copy of\nthis book in order to understand the background of the calendars \ncovered by this software.\n\nThe package contains all the functions that are required to calculate the \nsample dates and the holidays. A few functions that are used for \nillustration or alternative methods of calculation have not been \nimplemented.  \n\n`Calixir` has no relationship to the software `Calendrical`, \nwhich is a partial port of `calendrica-3.0.cl`, the software of the \nprevious edition of the Dershowitz-Reingold book, to Elixir.\n\nThe ported functions are tested against the data provided in the book. \nAll the functions of the Elixir port produce exactly the same data.\n\nThe data and the tests are included in this package.\n\n\n## Installation\n\nThe package is [available in Hex](https://hex.pm/docs/publish) and can be installed\nby adding `calixir` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:calixir, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\n## Documentation\n\nDocumentation has been generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). The docs can\nbe found at [https://hexdocs.pm/calixir](https://hexdocs.pm/calixir).\n\n## About the 'Design' of this Software\n\nThis software has no design. \n\nThe original Lisp package `calendrica-4.0.cl` has no notion of `modules` \nthat are a common means of design and separation of concerns in Elixir (and many other \nprogramming languages, for that matter). Instead, it uses a single large namespace. \nThe functions and macros in this namespace are differentiated by prefixes \nthat denote the various calendars (i.e. `gregorian_epoch`, `julian_epoch`, etc.).\n\nDuring the preparation of this package I tried various approaches: I tried to factor out \nthe different calendars into separate modules and even into separate packages (apps). \nThese attempts resulted in one or another form of 'dependency hell', because functions of\nseveral calendars are dependent on each other. Finally, I decided to strictly follow \nthe book (DR4) in the arrangement of functions and macros and to create one mononlithic \nmodule that mirrors most functions of the Lisp version. (In case you are interested: \nThe same approach was taken by the Python port of this software: \n[`PyCalCal`](https://github.com/espinielli/pycalcal).)\n\nThe naming of the Elixir functions follows closely the naming of the Lisp functions \n(except for using `_` instead of `-` in the function names). \n\nAll the functions and tests of this package are heaviliy cross-refrenced by the page and \nequation numbers in DR4, so that you can easily go to the source.\n\nIf you want to 'modularize' this package, I recommend to take this package for a base and \nto create thin wrappers for the calendars or aspects of your interest. I took this approach \nfor the companion package called [`Calendars`](https://hex.pm/packages/calendars), that factors out the various \nmonotonous (i.e. `Gregorian`) and cyclical (i.e. `Day_of_week`, `Olympiad`) calendars contained in \n`Calixir`.\n\n## Notes on Copyright and License\n\n`CALENDRICA 4.0 -- Common Lisp` is written and copyrighted by E. M. Reingold and N. Dershowitz as \ndescribed in file `COPYRIGHT_DERSHOWITZ_REINGOLD`. This copyright is part of the Common Lisp \nsource file. \n\nThis library is made public under the following conditions:\n\n- The code can be used for personal use.\n- The code can be used for demonstrations purposes.\n- Non-profit reuse with attribution is fine.\n- Commercial use of the algorithms should be licensed and are not allowed from this library.\n\nThe permissions above are granted **as long as attribution is given to the authors of the \noriginal algorithms, Nachum Dershowitz and Edward M. Reingold**.\n\nThe Calixir source code is licensed under the Apache License, Version 2.0,\nthe same license that is used by Elixir. You may obtain a copy of this License at \n[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).\n\n## Resources\n\nThe resources (source code and sample data) for this book are available as downloads \nfrom the publisher's website:\n[Cambridge University Press](https://www.cambridge.org/ch/academic/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition?format=PB\u0026isbn=9781107683167#resources).   \n\nThe Lisp source file is included in this package (in the `assets` directory)\nto make it easier to compare the Lisp and Elixir algorithms.\nThe sample data files are included in this package (also in the `assets` directory),\nbecause they are needed for the tests.\n\nProf. Reingold maintains a website, [CALENDARISTS.COM](https://www.cs.tau.ac.il/~nachum/calendar-book/index.shtml), \nwhere you can get information about previous editions of the book and other \ncalendar-related publications.\n\n## Changelog\n- 0.1.7 fixed function `last_day_of_gregorian_month`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frengel-de%2Fcalixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frengel-de%2Fcalixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frengel-de%2Fcalixir/lists"}