Giter Site home page Giter Site logo

simlist / pyluach Goto Github PK

View Code? Open in Web Editor NEW
56.0 4.0 8.0 955 KB

A Python package for manipulating Hebrew (Jewish) calendar dates and Hebrew-Gregorian conversion.

Home Page: https://github.com/simlist/pyluach

License: Other

Python 100.00%
calendar hebrew-calendar hebrew-date jewish-calendar jewish-holidays jewish

pyluach's People

Contributors

mhornbacher avatar simlist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pyluach's Issues

holiday support

I would like to have holiday support in this project.
The basic support is that if holiday=True, getparash will return the closest parasha or holiday, plus to add the hol-hamo'ed parashos to all parashos.
I don't mind contribute it myself, but first I would like to discuss the design with you.

New API - `fast`

I want to automatically congrats on holiday, but the blessing is different between fast and actual holiday.

We can do it without inflecting the current holiday API that still will return fast alongside holiday.

parshios.getparsha_string(): Parsha variable is referenced before assignment.

Good morning,

I noticed an issue with the new update:

Steps to Reproduce:

  1. Install the latest version of the package.
  2. Load up a python console
    2.5. Import the library (from pyluach import dates, parshios, hebrewcal)
  3. Create a today variable (e.g. today = dates.HebrewDate.today() )
  4. Call the function e.g. parshios.getparsha_string(today)

Expected Behavior:

Returns a string of the parsha

Actual Behavior:

Throws the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/menachem/.local/lib/python3.5/site-packages/pyluach/parshios.py", line 137, in getparsha_string
    if parsha is None:
UnboundLocalError: local variable 'parsha' referenced before assignment

Proposed Solution:

Move line 139 above line 137 so that parsha is assigned before the check.

Notes

Already fixed in dev branch

Line location:

if parsha is None:

Not having the year,

Thank you so much for such a wonderful package.

if I only have the month and day (Yahrzeit of Yusef Hasadik, which is today :) ), how would I calculate when it will be next year ?
I was thinking to

1: Assume it was this year,
Loop
2: if the date does not work try a year before
end of loop

so the birthdays will be correct, but yr is off.

pip install pylauch broken

Following the instructions on https://pypi.org/project/pyluach/, but am unable to install the library using pip or pip3. Was it delisted from pypi?

pip3 install pylauch
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement pylauch (from versions: none)
ERROR: No matching distribution found for pylauch

pip install pylauch
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement pylauch (from versions: none)
ERROR: No matching distribution found for pylauch

pip --version
pip 23.2.1 from /usr/local/lib/python3.10/dist-packages/pip (python 3.10)

pip3 --version
pip 23.2.1 from /usr/local/lib/python3.10/dist-packages/pip (python 3.10)

Shavuos in Elul?

today

HebrewDate(5782, 5, 27)

(today+10)

HebrewDate(5782, 6, 7)

(today+10).month_name()

'Elul'

(today+10).holiday()

'Shavuos'

Four Parshios in pyluach

It seems there is no support for Four Parshiot (Shekalim, Zachor, Para, Hodesh) in pyluach. Is that correct?

Official release?

Hello,

I was just wondering if there are any plans to publish an "official" (non-dev) release of this package? One of our dependencies started pulling in pyluach as a sub-dependency in a new release, and with our package management tool (pipenv) we either need to specify --pre to get it to work (which can then pull in other pre-release packages which we don't want, or pin our dependency to an older version.

Thanks!

feature request: Getting specific day of holiday

Hi.
First, I'd like to say thanks for this great package.

It'd be nice to be able to get the specific day of the holiday. For example "ב סוכות" instead of "סוכות" for all Sukkot days.

Hebrew date start with Tishery as the first month

When requested (with a flag or by another class), we set the Hebrew date to set Tishrey as the 1st month, and Elul as the last one.
I'm willing to start working on this feature, but first I wanted to check if it's something that you also think is useful and worth working on. I also wanted to consult with you what you think is the best approach for this feature (flag or another class).
Let me know what you think ☺️

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.